98.7% Of all customers recommend us, we're so confident about our results we publish all reviews and stats
View Live Stats View ReviewsForum home » Delegate support and help forum » Microsoft Excel Training and help » Adding dashes
Adding dashes
Resolved · Low Priority · Version 2010
Sophie has attended:
Excel Advanced course
Adding dashes
Hi
I am trying to convert the number on the left to the number on the right with underscore and dashes.
I have lots of cells that I need to do this to.
DH000172514 23 D_H0001-725-14
I went to format cells and custom and did #_####-###-## but my sample did not change - what am I doing wrong?
Thanks
Sophie
RE: adding dashes
Hi Sophie
Part of the problem is that DH0001... is not a Number
If you change the format as you suggested, it will work for all numbers but not numbers and letters.
It might be helpful to write a formula that adds in the "_" and the "-" to the character string
If you put this into A1
DH00017251423DH000172514
Paste this into B1
=CONCATENATE(LEFT(A1,14),"_",MID(A1,15,5),"-",MID(A1,20,3),"-",RIGHT(A1,2))
It should make it look like
DH00017251423D_H0001-725-14
This splits the Ref Number into the 4 parts and adds the underscore and dashes at each stage.
You can then copy and paste the "converted" ref over the top of the original (Paste special, Values/123)
Let me know if we can help you further with this.
Kind regards
Richard Bailey
Microsoft Certified Trainer
Best STL - https://www.stl-training.co.uk
98%+ recommend us
London's leader with UK wide delivery in Microsoft Office training and management training to global brands, FTSE 100, SME's and the public sector
Mon 17 Oct 2016: Automatically marked as resolved.
Training information:
See also:
Welcome. Please choose your application (eg. Excel) and then post your question. Our Microsoft Qualified trainers will then respond within 24 hours (working days). Frequently Asked Questions
Any suggestions, questions or comments? Please post in the Improve the forum thread. |
Excel tip:Create Equations in Excel 2010Here's how to create basic mathematical |