extract value

What version of Office/Excel are you using?
The newer versions have some really cool new text functions, so the answer we give you may depend on which version you are using.

I suggest that you update your Account details (or click your user name at the top right of the forum) so helpers always know what Excel version(s) & platform(s) you are using as the best solution often varies by version. (Don’t forget to scroll down & ‘Save’)
 
Upvote 0
As Joe4 points out it depends on your Excel version.
Formula in B1 will work if you have the TEXTAFTER function. If not try the formula in B2.

Book1
ABC
1PB-JK-25-42001454200145Newe ver of Excel with TEXTAFTER function
24200145Should work with older ver. of Excel
Sheet1
Cell Formulas
RangeFormula
B1B1=TEXTAFTER(A1,"-",-1)
B2B2=TRIM(RIGHT(SUBSTITUTE(A1,"-",REPT(" ",LEN(A1))),LEN(A1)))
 
Upvote 0
If it's always the same number of characters before the last hyphen, you could also do this:
=REPLACE(A1,1,9,"")
 
Upvote 0
If it's always the same number of characters before the last hyphen,
.. or if it is always the same number of characters after the last hyphen, you could also use this
=RIGHT(A1,7)

.. which all goes to emphasise, one example is not much to go on. A variety of samples that shows any variations in original data and/or expected results is much better.
 
Upvote 0

Forum statistics

Threads
1,226,812
Messages
6,193,114
Members
453,777
Latest member
Miceal Powell

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