Finding number after a specific character search

johnhuckv

New Member
Joined
Jul 12, 2017
Messages
1
Hi all,

I am creating a Macro that searches through a column and extracts data based on two letters unfortunately some of the data that is being extracted is wrong as it picks up on ends of works due to common use. ie if looking for AY if also finds the AY of day for example. What I am looking for is a way that after the first two characters it will look for a number between 0 and 9 and not a space.

This is the code I am using at the moment:

Sub Walkoutreport_Pt8()
'
' Walkoutreport_Pt8 Macro
' Produce formula to create structure numbers
'


'
ActiveCell.FormulaR1C1 = _
"=TRIM(LEFT(SUBSTITUTE(MID(RC[-2],FIND(R1C4,RC[-2]),LEN(RC[-2])),"" "",REPT("" "",20)),20))"
Range("E3").Select

Call Walkoutreport_Pt9

End Sub

Is there anything that I could use after the FIND part to use just to find digits 0 through to 9.

Any help appreciated

John
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.

Forum statistics

Threads
1,224,561
Messages
6,179,522
Members
452,923
Latest member
JackiG

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