Hi,
I am trying to create a macro that extracts the alpha prefix from a string in cell P2 then use the result to run a specific sub routine based on the outcome.
the strings are always alpha first ie VPT12345 or CEMS2468 however the alpha length varies
What I am wanting to do is if the result of the extraction = VPT then run a specific sub routine, or CEMS then run a different sub routine.
At the moment I am using using a User prompt to determine which sub routine to run I would like to simplify this process.
I am using Excel 2010 on Windows 7
Any help would be great
Cheers
I am trying to create a macro that extracts the alpha prefix from a string in cell P2 then use the result to run a specific sub routine based on the outcome.
the strings are always alpha first ie VPT12345 or CEMS2468 however the alpha length varies
What I am wanting to do is if the result of the extraction = VPT then run a specific sub routine, or CEMS then run a different sub routine.
At the moment I am using using a User prompt to determine which sub routine to run I would like to simplify this process.
I am using Excel 2010 on Windows 7
Any help would be great
Cheers
Last edited: