sycodiz
New Member
- Joined
- Jun 15, 2008
- Messages
- 27
I am using Elseif because I have a lot of stuff my code is checking. I am stuck on one area. I need to make sure what is in cell E23 shows up in one of the other cells in my code.
Sub ReviewItems()
If Range("C5").Value <> "New Item or Expand" Then
'There is a lot of ElseIfs before this statement I am having issues with
ElseIf (Range("E23").Value <> Range("C55").Value Or Range("E23").Value <> Range("E55").Value Or _
Range("E23").Value <> Range("G55").Value Or Range("E23").Value <> Range("C56").Value Or _
Range("E23").Value <> Range("E56").Value Or Range("E23").Value <> Range("G56").Value) Then
'ElseIf Range("E23").Value <> Range("C55").Value Then
MsgBox "UPC on Basic Record is not found in Item Control Ordering"
Else
MsgBox "Passed validations"
End If
The problem is - it just does not work. However the line that I comment blocked out (and formatted red above) does work correctly.
Any suggestions? Am i missing something?
Sub ReviewItems()
If Range("C5").Value <> "New Item or Expand" Then
'There is a lot of ElseIfs before this statement I am having issues with
ElseIf (Range("E23").Value <> Range("C55").Value Or Range("E23").Value <> Range("E55").Value Or _
Range("E23").Value <> Range("G55").Value Or Range("E23").Value <> Range("C56").Value Or _
Range("E23").Value <> Range("E56").Value Or Range("E23").Value <> Range("G56").Value) Then
'ElseIf Range("E23").Value <> Range("C55").Value Then
MsgBox "UPC on Basic Record is not found in Item Control Ordering"
Else
MsgBox "Passed validations"
End If
The problem is - it just does not work. However the line that I comment blocked out (and formatted red above) does work correctly.
Any suggestions? Am i missing something?