Hello - I have receieved some great help on an Excel worksheet I'm trying to put together - I thought I ought to start a new thread vs continuing the same thread throuhg several questions I've had - if Im doing this incorrectly please forgive me. Here is my question, reposted
I have a couple of issues I’m attempting to address with my project and hoped you folks could help me out. In the macro ‘SeparateIDs’ it looks for certain criteria in the Equipment ID it extracts..I need to broaden those criteria to include IDs containing hyphens and parenthesis as some IDs end up having numbers in parenthesis at the end of them. I also need to omit any results 2 characters or less. That brings me to my next hurdle…
..Prior to running the macro ‘SeparateIDs’ there is an equipment ID number in column F on the same row as the cell I’m extracting data from (‘Description’, column J)…that already existing ID in col F most often starts with a 2-digit number: what I’d like to do is when extracting the equipment ID’s from column J into column F, to reference the already existing number in F , if it starts with a 2-digit number then apply that 2-digit prefix to the beginning of the extracted IDs which have been pulled column J
So if F2 has an ID which is 03GT456 and the IDs we extract from J2 meet certain criteria we apply the ‘03’ prefix to the left side of them. The extracted IDs which need the prefix attached need to
· not be an ID which contains a hyphen
· be greater in length than 3 characters
So if the ID extracted from J2 was ‘LC456’, it would then be ‘03LC456’and so forth. If it was ‘V-456’ it would be left unchanged, but still extracted. If it was ‘GT’ it would not be extracted, and so forth.
I’ve tried experimenting with different expressions in the macro but am not certain I am using the ‘[‘ correctly and have failed miserably.
Is this something I can do with some modifications of the current macro?
Once again, thank you!
I have a couple of issues I’m attempting to address with my project and hoped you folks could help me out. In the macro ‘SeparateIDs’ it looks for certain criteria in the Equipment ID it extracts..I need to broaden those criteria to include IDs containing hyphens and parenthesis as some IDs end up having numbers in parenthesis at the end of them. I also need to omit any results 2 characters or less. That brings me to my next hurdle…
..Prior to running the macro ‘SeparateIDs’ there is an equipment ID number in column F on the same row as the cell I’m extracting data from (‘Description’, column J)…that already existing ID in col F most often starts with a 2-digit number: what I’d like to do is when extracting the equipment ID’s from column J into column F, to reference the already existing number in F , if it starts with a 2-digit number then apply that 2-digit prefix to the beginning of the extracted IDs which have been pulled column J
So if F2 has an ID which is 03GT456 and the IDs we extract from J2 meet certain criteria we apply the ‘03’ prefix to the left side of them. The extracted IDs which need the prefix attached need to
· not be an ID which contains a hyphen
· be greater in length than 3 characters
So if the ID extracted from J2 was ‘LC456’, it would then be ‘03LC456’and so forth. If it was ‘V-456’ it would be left unchanged, but still extracted. If it was ‘GT’ it would not be extracted, and so forth.
I’ve tried experimenting with different expressions in the macro but am not certain I am using the ‘[‘ correctly and have failed miserably.
Is this something I can do with some modifications of the current macro?
Once again, thank you!