Forum

IF and NOT FUNCTION
 
Notifications
Clear all

IF and NOT FUNCTION

2 Posts
2 Users
0 Reactions
69 Views
(@dieneba)
Posts: 50
Trusted Member
Topic starter
 

Hi

I am not quite clear on the use of the this nested function. Could you kindly give another example.

Regards

 
Posted : 11/01/2023 8:28 am
(@catalinb)
Posts: 1937
Member Admin
 

NOT returns the opposite of a logical condition.
Simply put, if your condition evaluates to TRUE, NOT TRUE will convert true to false.
Assuming that in cell A1 you have the value 45 and you want to perform an action when that cell is 45:

If Not Cells(1,1).Value45 then ' if A1 is not greater or smaller than 45
...
End if

Will return the same as:
If Cells(1,1).Value = 45 then ' if A1 equals 45
...
End if

 
Posted : 13/01/2023 1:51 am
Share: