Extracting only numbers in string, on right of dash

judwall

New Member
Joined
Dec 16, 2016
Messages
9
I am working with model numbers similar to this: ESLC148-12T

What formula can I use to extract just the numbers (in this case,"12") from the right of the dash?

I am using =REPLACE(W4,1,FIND("-",W4),"") to show me everything after the dash but I can't find how to go from there.
 
and this
=-LOOKUP(1,-LEFT(MID(A1,FIND("-",A1)+1,4),ROW($1:$4)))
Since such a small number of elements are involved, it should be more efficient to use the {1,2,3,4} array directly as opposed to calling out to the ROW function to create that same array for you.
 
Upvote 0

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.
I realize others have given you solutions that are shorter and might be faster (though, in this day and age that's a dubious benefit). To me the key is to robust solutions. Someday, someone will come up with a 5 digit code and the solutions that depend on a 1-4 digit code will return an incorrect result. IMO, that's worse than returning an error. But, that's me. :)
I got 3 answers that work - awesome! Thanks everyone:)
 
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,178
Members
449,071
Latest member
cdnMech

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top