Excel - inserting space in a text string

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I need to insert a space three characters from the right of a piece of text I
have in a cell. How do I do it? I was thinking along the lines of customer
formatting but this is proving troublesome as I'm an Excel novice.

Thanks,
Darren
 
If your piece of text is in cell A1, you could put the following formula into
a helper cell (such as B1): =LEFT(A1,3)&" "&RIGHT(A1,LEN(A1)-3). If you
want to convert the formula back into text, click on B1, press Ctrl+C to copy
it, then click on Edit | Paste Special | Paste: Values | OK.
 
Thanks for the info. However, it doesn't seem to work for all the cells. Is
this because the text strings are variable in length?
 
I thought I allowed for different lengths in the formula. Can you give
an example of one that doesn't work?
 
Duhhh! I just re-read your post, and now see that you want the space three
characters from the right. I originally misread your post and thought you
wanted the space three characters from the left. Okay, if your piece of text
is in cell A1, then in cell B1 put:
=LEFT(A1,LEN(A1)-3)&" "&RIGHT(A1,3)
 
To insert the space three characters from the right:

=LEFT(A1,LEN(A1)-3)&" "&RIGHT(A1,3)
 
Back
Top