N
N+
hi all !! how can i do the AND , OR function of worksheet
in the vbe ??
ty for helping !!
paolo
in the vbe ??
ty for helping !!
paolo
Gary''s Student said:AND and OR are operators in VBA, not functions in the worksheet:
Sub and_or()
If Range("A1").Value = 1 And Range("A2").Value = 1 Then
MsgBox ("Both are one")
End If
If Range("A1").Value = 1 Or Range("A2").Value = 1 Then
MsgBox ("At least one is one")
End If
End Sub