Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 385
Default formula to add space within text

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
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 67
Default formula to add space within text

Assuming your data is in A1:
B1: =concatenate(left(a1,3)," ",right(a1,3)) separate the quotes with a space

Leon

"Jennifer" wrote:

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

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,311
Default formula to add space within text

With your data in A1, if they are all 6 charaters in length, then:

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

HTH,
Paul

--

"Jennifer" wrote in message
...
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



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default formula to add space within text

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" wrote in message
...
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


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 385
Default formula to add space within text

Thanks for all your help, Leon, Paul and Rick! All three of these formulas
work great!
--
Jennifer


"Rick Rothstein (MVP - VB)" wrote:

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" wrote in message
...
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





  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default formula to add space within text

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.
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default formula to add space within text

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

On Thu, 10 Apr 2008 07:24:00 -0700, Jennifer
wrote:

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.


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how do you add a space when merging text using & ? eddie Excel Discussion (Misc queries) 2 May 3rd 07 08:42 PM
VBA inserting a space in a text Mouimet Excel Discussion (Misc queries) 3 November 9th 06 07:01 PM
Seperating text if there's more than a one space between them Joey Excel Discussion (Misc queries) 3 January 17th 06 07:41 PM
add space between the results of a formula and text rog Excel Discussion (Misc queries) 2 January 16th 06 03:33 PM
formula that will go up one space if no value in specified space skammi Excel Worksheet Functions 1 November 16th 05 03:28 PM


All times are GMT +1. The time now is 07:04 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"