Hi I have the following part of a macro. What I need it to do is check if each cell in column U have the value a,b,c,d, or is blank. If it is one of those values (or is blank) then continue on to the rest of my macro. However, if it is not one of those values then create a message box saying which cell it is in, and end the macro.
I started writing a little below, but got confused at this point.
Thanks to anyone who can help.
Sub TheSelectCase2()
Dim columnsetting, cell As Range
Dim a, b, c, d As String
a = "A"
b = "B"
c = "C"
d = "D"
Set columnsetting = Sheets("sheet1").Range(Range("U1"), Range("U65536").End(xlUp))
For Each cell In columnsetting
If cell.Value <> a Or b Or c Or d Then Exit Sub
Next cell
End Sub
Bookmarks