Q: String Comparison with Array Item and String with VBA in Excel This is probably a simple one, but I can't seem to find out what's wrong:
if temp_array(1) = temp_string2 & temp_array(2) = "w" then
....
end if

the values are:
temp_array(1) = "test1" 
temp_string2 = "test2"
temp_array(2) = "w"
I get a type mismatch error highlighting the conditional comparisons...

A: & is string concatenation, not logical and.
if temp_array(1) = temp_string2 And temp_array(2) = "w" then 

