I have this kind of product id in column D:
- 1942-PS-M-01
- 1942-PS-M-233
- 1942-P-M-25
- 1942-P-L-200
I want to set the value in column G Using the last 2/3 number in the product id value.
I tried to use formula such =MID([Product_ID],11,3) and =MID([Sample_ID],10,3), but none of this id efficient and I have to enter the formula 1 by 1 since the id is doest not have same length.
Is there any way to do so by using vba? because I have almost 20k rows of data
I have an idea like using if (len([Product_ID])<13 then =MID([Product_ID],11,3) or if (len([Product_ID])<12 then =MID([Product_ID],10,3) but doest not know how to implement this in vba