Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Concatenate an Hyphen

Hi Folks - I have account numbers that look like this:


10000000-03108-111-20-2102-52207-1200
10000001-03109-111-10-0000-52207-1200
10000002-03109-111-10-1600-52207-1200

etc....

What's the easist way to insert an hyphen after the first 2 digits so things
look like this:

10-000000-03108-111-20-2102-52207-1200
10-000001-03109-111-10-0000-52207-1200
10-000002-03109-111-10-1600-52207-1200

Thanks,

Michael


  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,058
Default Concatenate an Hyphen

=LEFT(A1,2) & "-" & RIGHT(A1,LEN(A1)-2)
--
Gary''s Student - gsnu200828


"Michael" wrote:

Hi Folks - I have account numbers that look like this:


10000000-03108-111-20-2102-52207-1200
10000001-03109-111-10-0000-52207-1200
10000002-03109-111-10-1600-52207-1200

etc....

What's the easist way to insert an hyphen after the first 2 digits so things
look like this:

10-000000-03108-111-20-2102-52207-1200
10-000001-03109-111-10-0000-52207-1200
10-000002-03109-111-10-1600-52207-1200

Thanks,

Michael



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1,240
Default Concatenate an Hyphen

Michael wrote:
Hi Folks - I have account numbers that look like this:


10000000-03108-111-20-2102-52207-1200
10000001-03109-111-10-0000-52207-1200
10000002-03109-111-10-1600-52207-1200

etc....

What's the easist way to insert an hyphen after the first 2 digits so things
look like this:

10-000000-03108-111-20-2102-52207-1200
10-000001-03109-111-10-0000-52207-1200
10-000002-03109-111-10-1600-52207-1200

Thanks,

Michael



=LEFT(A1,2)&"-"&MID(A1,3,9999)
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 9
Default Concatenate an Hyphen

Awesome guys ... Thanks.

Michael


"Glenn" wrote in message
...
Michael wrote:
Hi Folks - I have account numbers that look like this:


10000000-03108-111-20-2102-52207-1200
10000001-03109-111-10-0000-52207-1200
10000002-03109-111-10-1600-52207-1200

etc....

What's the easist way to insert an hyphen after the first 2 digits so
things look like this:

10-000000-03108-111-20-2102-52207-1200
10-000001-03109-111-10-0000-52207-1200
10-000002-03109-111-10-1600-52207-1200

Thanks,

Michael



=LEFT(A1,2)&"-"&MID(A1,3,9999)



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
Trying to use IF statement with hyphen AmytDev Excel Worksheet Functions 3 May 15th 07 04:50 PM
Optional hyphen? Eric Excel Discussion (Misc queries) 4 October 19th 06 01:31 AM
Copy Text to Right of Hyphen ConfusedNHouston Excel Discussion (Misc queries) 3 July 27th 06 07:25 PM
...I want to display a hyphen instead of zero... Dr. Darrell Excel Worksheet Functions 2 August 1st 05 01:18 PM
Can I enter a date without using the / or hyphen? mscpa Excel Discussion (Misc queries) 2 December 12th 04 09:01 PM


All times are GMT +1. The time now is 03:28 AM.

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

About Us

"It's about Microsoft Excel"