Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

formula to add space within text

26,452 views
Skip to first unread message

Jennifer

unread,
Apr 10, 2008, 10:24:00 AM4/10/08
to
I am using Microsoft Excel 2003 and I was wondering if there is a formula
that will add a space in the middle of text. For example I have a column of
postal codes that look like this N6C1V9 and I would like them to look like
this N6C 1V9 instead.
--
Jennifer

Leon

unread,
Apr 10, 2008, 10:31:02 AM4/10/08
to
Assuming your data is in A1:
B1: =concatenate(left(a1,3)," ",right(a1,3)) separate the quotes with a space

Leon

PCLIVE

unread,
Apr 10, 2008, 10:35:09 AM4/10/08
to
With your data in A1, if they are all 6 charaters in length, then:

=LEFT(A1,3)&" "&RIGHT(A1,3)

HTH,
Paul

--

"Jennifer" <Jenn...@discussions.microsoft.com> wrote in message
news:3DF75A85-B9CA-493D...@microsoft.com...

Rick Rothstein (MVP - VB)

unread,
Apr 10, 2008, 10:57:26 AM4/10/08
to
I'm under the impression that for those type of postal codes, the number of
characters in front of the space can vary, but the number of characters
after it will always be 3. If that is correct, then use this formula...

=REPLACE(A1,LEN(A1)-2,0," ")

Of course, you can use the above formula if your postal codes are always 6
characters long; but, if that is the case, you can use this shorter
variation...

=REPLACE(A1,4,0," ")

Rick


"Jennifer" <Jenn...@discussions.microsoft.com> wrote in message
news:3DF75A85-B9CA-493D...@microsoft.com...

Jennifer

unread,
Apr 10, 2008, 12:19:01 PM4/10/08
to
Thanks for all your help, Leon, Paul and Rick! All three of these formulas
work great!
--
Jennifer

Gord Dibben

unread,
Apr 11, 2008, 7:35:20 PM4/11/08
to
Look like 6-character Canadian Postal Codes.

If true, I have some code that will allow you to enter a PC as n6c1v9 and return
N6C 1V9

Won't do you any good after the fact but for future entry??


Gord Dibben MS Excel MVP

sunnywa...@gmail.com

unread,
Jun 30, 2015, 12:56:40 AM6/30/15
to
Hi Rick,

I have a string like this "Text/Text/Text/Text" Now i want it to convert like this "Text / Text / Text / Text" in excel 2010

Please help. Thanks in advance.

Maurizio Borrelli

unread,
Jun 30, 2015, 1:20:44 AM6/30/15
to
Il 30/06/2015, sunnywa...@gmail.com ha detto :
Hi,
try
=SUBSTITUTE("Text/Text/Text/Text","/"," / ")

--
Ciao! :)
Maurizio
0 new messages