Hi All
I have this line of code in a vba macro that I use
Range("B2:B" & LR).FormulaR1C1 = "=IF(RC[-1]=""LARRY"",""Lar"",""NONE"")"
It is in column B looking at column A and if the word/name in the corresponding cell in column A is “LARRY” it works fine. (either Lar or NONE).
My problem is I would like to modify it so that if the name in column A is AD/LOU, AD/TOM, or any AD/*** it will put AD in column B.
In simpler terms if in
Column A LARRY, column B=Lar
Column A AD/***, column B=AD
Column A OFFICE, column B=OFF
Anything else in column A column B will =NONE
Thanks for any help.
irenesboy
PS: after doing a lot of searching it might be some kind of LEFT function
I have this line of code in a vba macro that I use
Range("B2:B" & LR).FormulaR1C1 = "=IF(RC[-1]=""LARRY"",""Lar"",""NONE"")"
It is in column B looking at column A and if the word/name in the corresponding cell in column A is “LARRY” it works fine. (either Lar or NONE).
My problem is I would like to modify it so that if the name in column A is AD/LOU, AD/TOM, or any AD/*** it will put AD in column B.
In simpler terms if in
Column A LARRY, column B=Lar
Column A AD/***, column B=AD
Column A OFFICE, column B=OFF
Anything else in column A column B will =NONE
Thanks for any help.
irenesboy
PS: after doing a lot of searching it might be some kind of LEFT function