Existing Excel Data

  • Thread starter Thread starter mes44
  • Start date Start date
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
 
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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top