NOT Logical Operator

Excel VBA for Beginners 8- Must know Excel Logic
2 minutes
Share the link to this page
Copied
  Completed
You need to have access to the item to view this lesson.
One-time Fee
$99.99
List Price:  $139.99
You save:  $40
€88.12
List Price:  €123.37
You save:  €35.25
£75.18
List Price:  £105.25
You save:  £30.07
CA$138.90
List Price:  CA$194.46
You save:  CA$55.56
A$156.83
List Price:  A$219.58
You save:  A$62.74
S$131.51
List Price:  S$184.12
You save:  S$52.61
HK$775.60
List Price:  HK$1,085.88
You save:  HK$310.27
CHF 83.09
List Price:  CHF 116.33
You save:  CHF 33.23
NOK kr1,046.06
List Price:  NOK kr1,464.52
You save:  NOK kr418.46
DKK kr657.87
List Price:  DKK kr921.04
You save:  DKK kr263.17
NZ$168.01
List Price:  NZ$235.22
You save:  NZ$67.21
د.إ367.26
List Price:  د.إ514.19
You save:  د.إ146.92
৳12,184.03
List Price:  ৳17,058.13
You save:  ৳4,874.10
₹8,544.37
List Price:  ₹11,962.46
You save:  ₹3,418.08
RM437.35
List Price:  RM612.31
You save:  RM174.96
₦161,477.85
List Price:  ₦226,075.45
You save:  ₦64,597.60
₨28,185.43
List Price:  ₨39,460.74
You save:  ₨11,275.30
฿3,356.16
List Price:  ฿4,698.76
You save:  ฿1,342.60
₺3,841.89
List Price:  ₺5,378.80
You save:  ₺1,536.90
B$568.14
List Price:  B$795.42
You save:  B$227.28
R1,890.62
List Price:  R2,646.95
You save:  R756.32
Лв172.28
List Price:  Лв241.20
You save:  Лв68.91
₩143,858.36
List Price:  ₩201,407.46
You save:  ₩57,549.09
₪361.73
List Price:  ₪506.44
You save:  ₪144.70
₱5,629.08
List Price:  ₱7,880.94
You save:  ₱2,251.86
¥14,360.56
List Price:  ¥20,105.36
You save:  ¥5,744.80
MX$1,967.49
List Price:  MX$2,754.57
You save:  MX$787.07
QR365.54
List Price:  QR511.77
You save:  QR146.23
P1,372.73
List Price:  P1,921.88
You save:  P549.14
KSh12,928.70
List Price:  KSh18,100.70
You save:  KSh5,172
E£5,095.49
List Price:  E£7,133.89
You save:  E£2,038.40
ብር13,363.68
List Price:  ብር18,709.69
You save:  ብር5,346.01
Kz91,190.88
List Price:  Kz127,670.88
You save:  Kz36,480
CLP$93,634.10
List Price:  CLP$131,091.49
You save:  CLP$37,457.38
CN¥728.62
List Price:  CN¥1,020.10
You save:  CN¥291.48
RD$5,950.80
List Price:  RD$8,331.37
You save:  RD$2,380.56
DA13,239.38
List Price:  DA18,535.66
You save:  DA5,296.28
FJ$226.02
List Price:  FJ$316.44
You save:  FJ$90.41
Q772.29
List Price:  Q1,081.24
You save:  Q308.94
GY$20,980.20
List Price:  GY$29,373.12
You save:  GY$8,392.92
ISK kr12,751.72
List Price:  ISK kr17,852.92
You save:  ISK kr5,101.20
DH930.08
List Price:  DH1,302.15
You save:  DH372.06
L1,725.90
List Price:  L2,416.34
You save:  L690.43
ден5,418.03
List Price:  ден7,585.47
You save:  ден2,167.43
MOP$801.14
List Price:  MOP$1,121.63
You save:  MOP$320.48
N$1,871.37
List Price:  N$2,620
You save:  N$748.62
C$3,677.30
List Price:  C$5,148.36
You save:  C$1,471.06
रु13,683.42
List Price:  रु19,157.33
You save:  रु5,473.91
S/370.08
List Price:  S/518.13
You save:  S/148.04
K415.05
List Price:  K581.08
You save:  K166.03
SAR375.06
List Price:  SAR525.10
You save:  SAR150.04
ZK2,820.31
List Price:  ZK3,948.54
You save:  ZK1,128.23
L438.62
List Price:  L614.09
You save:  L175.46
Kč2,200.37
List Price:  Kč3,080.61
You save:  Kč880.24
Ft35,885.33
List Price:  Ft50,240.90
You save:  Ft14,355.56
SEK kr970.12
List Price:  SEK kr1,358.21
You save:  SEK kr388.09
ARS$117,436.71
List Price:  ARS$164,416.09
You save:  ARS$46,979.38
Bs692.90
List Price:  Bs970.09
You save:  Bs277.19
COP$431,883.36
List Price:  COP$604,653.98
You save:  COP$172,770.62
₡50,546.18
List Price:  ₡70,766.68
You save:  ₡20,220.49
L2,599.65
List Price:  L3,639.62
You save:  L1,039.96
₲802,598.39
List Price:  ₲1,123,669.86
You save:  ₲321,071.46
$U4,173.81
List Price:  $U5,843.51
You save:  $U1,669.69
zł376.53
List Price:  zł527.16
You save:  zł150.63
Already have an account? Log In

Transcript

Hey guys, welcome back. So in this video we're going to discuss the knot logical operator. So the knot logical operator, what it does is that it converts true values to false and vice versa. So we will also convert to false value to a true. So here in this simple macro here, we're going to create a variable which is x, and we're going to put a value of three to the x variable. And then we're going to have an if statement here.

So here on the first part of the if statement, it says, if not x is equal to three, then give me a message box x is not equal to three. So basically, x is equal to three, this part here will yield a true because x is actually equal to three. However, because it's put inside a not logical operator, this means that this true yielded by this part, will actually become a force. So this whole thing will become a false. So that means that this if statement, when executed, it's not going to go and execute the message box because the condition here, which is not x equal to three is equal to false, because you can see here that the form of an if statement here is that if condition is equal to true, then you can go ahead and execute the code. So this part here, not x equal to three is actually the condition and this is going to become a false, right because x is equal to three.

This is true, but because it's inside not, then it's going to become a false. Now if you look on the following, else, if part here we will see our x is not equal to three, this part here will yield to false but because it's put inside a knot, then it's going to be a two. So here the condition is going to be equal to true. And actually, we're going to have this message box executed x is equal to So let's run through that and see what happens. So here we're going to assign x equal to three. And then we're going to test this, this condition, not x equal to three is going to be a full.

So the message box, the first one here is not going to be executed. And then we're going to test the else if you're, and you can see here that the message box has been executed. So basically, in a nutshell, the non logical operator converts to true to a false or false to a true and it's important to know about that logical operator. You could find it in somebody else's code, or you could use it to convert a true value to a false or vice versa. So that's it guys for the not logical operator. Thank you very much for watching this video and I'll see you on the next one.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.