Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default How to add "-" into 10 digit numbers

Having a column with 10 digit alphanumeric data (ie H1187600) I need to add
dashes after the 2nd and the 6th digit to look like H1-1876-00.
Shouldn't be difficult?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default How to add "-" into 10 digit numbers

Try this:

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

I assume you mean you are starting with 8 digit data and want it to
become 10 digit (characters).

Hope this helps.

Pete

On Apr 28, 1:36*pm, Dr. S <Dr. wrote:
Having a column with 10 digit alphanumeric data (ie H1187600) I need to add
dashes after the 2nd and the 6th digit to look like H1-1876-00.
Shouldn't be difficult?


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,718
Default How to add "-" into 10 digit numbers

=REPLACE(REPLACE(A1,3,,"-"),8,,"-")


"Dr. S" wrote:

Having a column with 10 digit alphanumeric data (ie H1187600) I need to add
dashes after the 2nd and the 6th digit to look like H1-1876-00.
Shouldn't be difficult?

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
Validation ?:Accepting both Numbers AND specific letters("N","n"," Antonio Excel Discussion (Misc queries) 2 April 22nd 08 05:07 PM
change "true" and "false" to "availble" and "out of stock" inthestands Excel Worksheet Functions 2 July 19th 07 07:05 PM
Mail Merge drops 1st digit ("0") converting from Excel to Word Chuck Martini Excel Discussion (Misc queries) 3 August 7th 06 10:34 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM


All times are GMT +1. The time now is 04:56 PM.

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"