View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.misc
Max Max is offline
external usenet poster
 
Posts: 9,221
Default How to remove characters in a cell that precede a specific hyphen

Presuming your data in A1 down looks like this:
ABC-12345-12344
ABC-12345-12355
etc

In B1:
=MID(A1,SEARCH("-",A1,SEARCH("-",A1)+1)+1,99)+0
Copy down to return the numbers after the 2nd hyphen as real numbers,
viz:
12344
12355
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"brantty" wrote:
I have a column of cells that have excess data that needs removed. The #of
characters vary. I'm needing a formula to delete all the characters that
precede the 2nd hyphen as well as delete the 2nd hyphen.

Ex. [ABC-12345-12345]

I need the cell to read [12345]

Can anyone provide a formula that can remove this data?