Hello,
would need your help to design a VBA code to search for several groups of characters and the extract a number of characters .
here is how my data looks like on one row:
OCN PLANTIN SPRL 30-MAR-11 713829 1708050 5081488 - Proj 11082 TAG T06R2046 CAR 10007
i have designed a formula to extract the string that starts with "T0" but i have an exception where the tag number is followed by point and another 2 digits for ex:
T06R2022.04; project 11153; CAR: TNT
i would need the result to be T06R2022.04
i looked at the data and unfortunatly there can be different character after the tag number it can be jsut space or semicolon or coma
i was thinking to solve this by inserting a search function that would determine if the 9th chracter is point or not; if it is then to copy also the next 2 digits.
would need your help to design a VBA code to search for several groups of characters and the extract a number of characters .
here is how my data looks like on one row:
OCN PLANTIN SPRL 30-MAR-11 713829 1708050 5081488 - Proj 11082 TAG T06R2046 CAR 10007
i have designed a formula to extract the string that starts with "T0" but i have an exception where the tag number is followed by point and another 2 digits for ex:
T06R2022.04; project 11153; CAR: TNT
i would need the result to be T06R2022.04
i looked at the data and unfortunatly there can be different character after the tag number it can be jsut space or semicolon or coma
i was thinking to solve this by inserting a search function that would determine if the 9th chracter is point or not; if it is then to copy also the next 2 digits.
Code:
For i = 8 To LR
If UCase(Cells(i, 7).Text) Like "*T0*" Then
Cells(i, LC + 3).Value = Mid(Cells(i, LC).Text, _
Application.WorksheetFunction.Find("T0", UCase(Cells(i, LC).Text)), 8)
endif
next i