Need strip out data from column A using VBA
Breaking it out:
Instr(.Text, "R") finds the position of the first instance of the
letter R in the Text of the cell. Likewise Instr(.Text, "L") finds
the position of the first instance of the letter L.
For purposes of discussion, assume the first R is at position 30 and
the first L is at position 20.
Left(.Text, instr(.Text, "R") - 1) returns the first (30-1)=29
characters of the text, stripping off the right hand side.
Then Mid(Left(...),Instr(.Text, "L")) takes the result from above
and returns the text starting at position 20 and following,
stripping off the left hand side.
In article ,
"Lillian" wrote:
Your VBA work great, I got what I need it, but I do
not understant for the following:
With rCell
.Value = Mid(Left(.Text, _
InStr(.Text, "R") - 1), InStr(.Text, "L"))
Can you explain to me, thanks.
|