Eloise T
Active Member
I have a macro line or two (see below) that needs to reduce any of the following...
from:
oss
nn INCH OSS
nn IN OSS
nn" OSS
OSS nn"
where nn = any two-digit number
to simply:
OSS
I've tried using the following 3 lines:
.Replace "oss", "OSS", xlWhole ...which works with [oss to OSS]
.Replace "**OSS ?? in", "OSS", xlPart ...which works with [OSS 65 in to OSS]
.Replace "?? ** OSS", "OSS", xlPart ...which also works with [65 IN OSS to OSS]
or to put it another way ...it corrects:
oss
nn INCH OSS
nn IN OSS
but does not correct:
nn" OSS
OSS nn"
I'm pulling my hair out! Please help before it's all gone...
Thanks in advance.
from:
oss
nn INCH OSS
nn IN OSS
nn" OSS
OSS nn"
where nn = any two-digit number
to simply:
OSS
I've tried using the following 3 lines:
.Replace "oss", "OSS", xlWhole ...which works with [oss to OSS]
.Replace "**OSS ?? in", "OSS", xlPart ...which works with [OSS 65 in to OSS]
.Replace "?? ** OSS", "OSS", xlPart ...which also works with [65 IN OSS to OSS]
or to put it another way ...it corrects:
oss
nn INCH OSS
nn IN OSS
but does not correct:
nn" OSS
OSS nn"
I'm pulling my hair out! Please help before it's all gone...
Thanks in advance.
Last edited: