Existing Excel Data
Hello everyone, Is there an easy way to insert dashes (-) into existing data. For example, I want to insert dashes into the following data 123456789, I want it to look like this, 123456-78-9. I have many records to do this to, so any help is much appreciated. Thanks. -- mes44 ------------------------------------------------------------------------ mes44's Profile: http://www.excelforum.com/member.php...o&userid=28183 View this thread: http://www.excelforum.com/showthread...hreadid=477128 |
Existing Excel Data
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. mes44 wrote: Hello everyone, Is there an easy way to insert dashes (-) into existing data. For example, I want to insert dashes into the following data 123456789, I want it to look like this, 123456-78-9. I have many records to do this to, so any help is much appreciated. Thanks. -- mes44 ------------------------------------------------------------------------ mes44's Profile: http://www.excelforum.com/member.php...o&userid=28183 View this thread: http://www.excelforum.com/showthread...hreadid=477128 -- Dave Peterson |
Existing Excel Data
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 -- swatsp0p ------------------------------------------------------------------------ swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101 View this thread: http://www.excelforum.com/showthread...hreadid=477128 |
All times are GMT +1. The time now is 12:12 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com