Hi,
I have a And function but it is not in correct Logic so plz Help
And (wsh1.Range("M" & l2).Value) > (wsh1.Range("Y" & l2).Value) Or (wsh1.Range("M" & l2).Value) < (wsh1.Range("Y" & l2).Value)
Logic is M > Y Or M < Y
Thnx for the Help
Hi,
I have a And function but it is not in correct Logic so plz Help
And (wsh1.Range("M" & l2).Value) > (wsh1.Range("Y" & l2).Value) Or (wsh1.Range("M" & l2).Value) < (wsh1.Range("Y" & l2).Value)
Logic is M > Y Or M < Y
Thnx for the Help
Awesome
Great Suggestion
Thnx Alot Sir
Have a Great Day
Is this the Solution?
And (wsh1.Range("M" & l2).Value) <> (wsh1.Range("Y" & l2).Value)
After reading your posts, I suggest you try the following code 4 times,
each time active one of the commented lines and see what happens.
![]()
Sub Learning_And_Or() Dim M, Y, Answer M = 1 Y = 2 'Answer = And(M>Y or M<Y) 'Answer = And(M<>Y) 'Answer = M > Y Or M < Y 'Answer = M > Y And M < Y Debug.Print Answer End Sub
Barriers are there for those who don't want to dream
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks