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
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