Hi All,
I'm a beginner to VBA, but honestly am starting to enjoy it alot. I'm messing around with this one macro, but I find myself using way too many IF statements.
I'm just wondering if anyone knew how to condense the code for the following:
Sheet1
A1= "ABC"
A8= "DEF"
Sheet2
A3 = "DEF"
A9 = "XYZ"
This is what I wanna do. In sheet1 I have two values. I am trying to write a macro that will tell me whether the cells in sheet2 A3 or A9 contain those values, and if so make teh cells that contain the valid value(s) green, and the cell that don't cotain the values make red.
I can do this with if statments, but the code is getting long. I'm not familiar with working with Ranging or Array, and for some reason I think I would need to use them.
If someone could please help me I would appreciate it.
Thanks In Advance.
I'm a beginner to VBA, but honestly am starting to enjoy it alot. I'm messing around with this one macro, but I find myself using way too many IF statements.
I'm just wondering if anyone knew how to condense the code for the following:
Sheet1
A1= "ABC"
A8= "DEF"
Sheet2
A3 = "DEF"
A9 = "XYZ"
This is what I wanna do. In sheet1 I have two values. I am trying to write a macro that will tell me whether the cells in sheet2 A3 or A9 contain those values, and if so make teh cells that contain the valid value(s) green, and the cell that don't cotain the values make red.
I can do this with if statments, but the code is getting long. I'm not familiar with working with Ranging or Array, and for some reason I think I would need to use them.
If someone could please help me I would appreciate it.
Thanks In Advance.