3

I was working on a Google Spreadsheet and I found that it does not allow more than one white space anywhere.

Is there any option to stop auto trimming on text? I searched it but didn’t found any solution.

╔═══════════════════╦═════════════╗
║ what google gives ║ what I want ║
╠═══════════════════╬═════════════╣
║ text              ║    text     ║
╚═══════════════════╩═════════════╝
3

You can use a formula workaround which should work regardless of the OS, eg:

=CHAR(160)&"text"

=CHAR(160)&CHAR(160)&"text"

=REPT(CHAR(160);3)&"text"

| improve this answer | |
1

It kept removing extra spaces, even when I placed a character in the front (e.g. =CHAR(160)&"text") and pasted those results over. Here's what worked for handling leading spaces (this solution won't accommodate text with trailing spaces):

Determine the number of leading/training spaces, in B1 enter: =LEN(A1)-LEN(TRIM(A1))

Paste the original text over to Google sheets, along with the results from the formula used above that counts leading/trailing spaces.

Then in a new cell, enter: =REPT(" ",B1)&A1

This worked for me!

| improve this answer | |
0

I always use the keystrokes "Alt+0160" or "Alt+255" to get it to indent.

You have to be in cell edit mode. Type the keystrokes above for a space. This solves your question "stop auto trimming on text" but your subject says "allow trailing white spaces". With the limited info I would say it works for that too.

This is useful for indenting and such in some formats.

| improve this answer | |
  • thanks for your answer .. but I am using fedora os. When I press any number holding alt .. it changes the window .. – Let's Code Jun 19 '13 at 3:53
  • That being a critical part of your problem, would have been nice to see that in the question. – William Jun 19 '13 at 14:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.