I want to put this If in a macro but it gives me an error all the time. I dont know if "Or" is used correctly or not.
Dim SMAT As String
SMAT = "blahblahblah"
(...)
If Cells(h + 2, 24) <> SMAT Or SMBE Or SMES Or SMFR Or SMGB Or SMGR Or SMRO1 Or SMRO2 Or SMRO3 Or SMDE Then
C(j) = Cells(h + 2, 5)
Cells(h + 2, 24)is not equal to all of thoseSM*strings? If so, you'll need to repeat the test each time.If (Cells(h + 2, 24) <> SMAT) Or (Cells(h + 2, 24) <> SMBE) Or ...Parentheses help.