Hi,
Simple issue. I want to go through a series of rows in a column ("A") and check if they contain a certain string. If so, they should set a variable to 1, else to -1. I understand that the value property cannot grab values for multiple cells. However, I tried using For Each to hopefully try and get around this, but VBA seems to still be missing the string even though it's contained in the row it iterates through (which ends up producing -1 in the message box).
Code as follows:
Note that if I replace Range("A:A") with Range("A3") (the cell that contains the word "Doc"), it returns 1 which means it worked.
Thanks in advance for any help!
Bookmarks