Hi All,
I have a column that can contain two values each cell can contain one value at a time
Eg.
Apple
Cherry
Apple
Cherry
The whole column is filled with either values and nothing else. I used a macro of if statements to check the cell data is Apple OR Cherry if it contains something else it will use msgbox to display that error found and it's not Apple or Cheery but it keeps getting wrong info.
If cells(i, 1).value <> “Apple” Or cells(i, 1).value <> “Cherry” then
Msgbox ”error”
End if
I have a column that can contain two values each cell can contain one value at a time
Eg.
Apple
Cherry
Apple
Cherry
The whole column is filled with either values and nothing else. I used a macro of if statements to check the cell data is Apple OR Cherry if it contains something else it will use msgbox to display that error found and it's not Apple or Cheery but it keeps getting wrong info.
If cells(i, 1).value <> “Apple” Or cells(i, 1).value <> “Cherry” then
Msgbox ”error”
End if
Last edited: