Existing Excel Data

M

mes44

Hello everyone,

Is there an easy way to insert dashes (-) into existing data. Fo
example, I want to insert dashes into the following data 123456789,
want it to look like this, 123456-78-9. I have many records to do thi
to, so any help is much appreciated.

Thanks
 
D

Dave Peterson

If the cells are numeric, you could use a custom format:

format|cells|custom category
000000-00-0

The value in the cells won't change, but what is shown will.
 
S

swatsp0p

Assuming you have nine digit numbers and you want the dash after digits
6 and 8, use this:

=LEFT(A1,6)&"-"&MID(A1,7,2)&"-"&RIGHT(A1,1) where A1 holds your nine
digit number. Displays: 123456-78-9 in the formula cell.

If you only want the appearance of the dashes, without actually
changing the data, use Custom formatting: ######-##-# Displays
123456-78-9 in the original cell, while the contents remain 123456789.

Good Luck
 
Top