#1
|
|||
|
|||
Need an excel formula to remove dashes in a number sequence
Hi,
I have attached a file. I need an excel formula in excel that: 1. Separates the last eight numbers from the cells A1, A2, and A3, AND removes the dash. I only want the last eight numbers from each sequence to appear in the cell (without dashes) because I need to input the 8 numbers into a system. I have given an example of how it should appear in the excel file. Additionally, if there is a macro that would be able to go in the cell and delete the dash in each cell so that only the 8 last numbers remain, this would be useful for another file I have and also to learn how to code the Macro correctly. I want a Macro that would remove the dashes from an entire column of number sequences and bring back the 8 digits (not sure if thats possible). Let me know. Thank you. |
#2
|
||||
|
||||
Try:
=LEFT(SUBSTITUTE(A1,"-",""),8)
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
|||
|
|||
Thanks a bunch. Thats a genius formula. Substitution is a great formula to know. Thank you. .
|
#4
|
||||
|
||||
In your initial post, you referred to a macro. Now that you have the formula, is a macro required?
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Formula to add number of pallets shipped | piglovindillard | Excel | 2 | 08-13-2012 06:40 AM |
letters are dashes | pmd | Word | 5 | 03-05-2012 08:08 PM |
number remove, data get | gsrikanth | Excel | 5 | 02-23-2012 05:42 AM |
Why word does not wrap on dashes? | lyrebird | Word | 3 | 06-23-2010 01:32 AM |
Excel sheet Sequence Number | belloffice | Excel | 1 | 02-25-2010 02:41 PM |