Help with Parsing String with MID

tbruce

Board Regular
Joined
Dec 9, 2013
Messages
77
Office Version
  1. 365
Platform
  1. Windows
Hi all,

Looking for a little help with this formula. My formula doesn't seem to work properly due to the "-" being used.

I'm trying to extract the first four digits between "(DRILL-1) " and "-" (e.g.4106 and 4108) and place into column B and then from the "-" to the end of the digits (e.g. 20692 and 5434) into column C using formulas.

Any help with a formula would be appreciated.

[TABLE="class: grid, width: 700"]
<tbody>[TR]
[TD][/TD]
[TD="align: center"]A[/TD]
[TD="align: center"]B[/TD]
[TD="align: center"]C[/TD]
[/TR]
[TR]
[TD][/TD]
[TD="align: center"]Serial Number[/TD]
[TD="align: center"]Make[/TD]
[TD="align: center"]Model[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]NFPC1193R_RyLAPi (DRILL-1) 4106-20692[/TD]
[TD]4106[/TD]
[TD]20692[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]NFPC1193R_RyLAPi (DRILL-1) 4108-5434[/TD]
[TD]4108[/TD]
[TD]5434[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Maybe this


Excel 2007
ABCD
1Serial NumberMakeModel
2NFPC1193R_RyLAPi (DRILL-1) 4106-20692410620692
3NFPC1193R_RyLAPi (DRILL-1) 4108-543441085434
4
5
Sheet1
Cell Formulas
RangeFormula
B2=MID(A2,SEARCH(") ",A2)+2,4)*1
B3=MID(A3,SEARCH(") ",A3)+2,4)*1
C2=TRIM(RIGHT(SUBSTITUTE(A2,"-",REPT(" ",LEN(A2))),LEN(A2)))*1
C3=TRIM(RIGHT(SUBSTITUTE(A3,"-",REPT(" ",LEN(A3))),LEN(A3)))*1
 
Last edited:
Upvote 0

Forum statistics

Threads
1,224,746
Messages
6,180,704
Members
452,994
Latest member
Janick

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