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
€85.01
List Price:  €119.02
You save:  €34
£74.08
List Price:  £103.71
You save:  £29.63
CA$138.06
List Price:  CA$193.28
You save:  CA$55.22
A$151.41
List Price:  A$211.98
You save:  A$60.57
S$128.39
List Price:  S$179.76
You save:  S$51.36
HK$777.55
List Price:  HK$1,088.60
You save:  HK$311.05
CHF 79.50
List Price:  CHF 111.31
You save:  CHF 31.80
NOK kr990.78
List Price:  NOK kr1,387.13
You save:  NOK kr396.35
DKK kr634.55
List Price:  DKK kr888.40
You save:  DKK kr253.84
NZ$170.19
List Price:  NZ$238.28
You save:  NZ$68.08
د.إ367.21
List Price:  د.إ514.11
You save:  د.إ146.90
৳12,174.73
List Price:  ৳17,045.11
You save:  ৳4,870.37
₹8,810.73
List Price:  ₹12,335.38
You save:  ₹3,524.64
RM420.65
List Price:  RM588.93
You save:  RM168.28
₦149,972
List Price:  ₦209,966.80
You save:  ₦59,994.80
₨28,291.87
List Price:  ₨39,609.76
You save:  ₨11,317.88
฿3,183.98
List Price:  ฿4,457.70
You save:  ฿1,273.72
₺4,138.49
List Price:  ₺5,794.06
You save:  ₺1,655.56
B$531.23
List Price:  B$743.75
You save:  B$212.51
R1,735.27
List Price:  R2,429.45
You save:  R694.17
Лв166.19
List Price:  Лв232.68
You save:  Лв66.48
₩139,621.31
List Price:  ₩195,475.43
You save:  ₩55,854.11
₪333.48
List Price:  ₪466.89
You save:  ₪133.40
₱5,712.52
List Price:  ₱7,997.76
You save:  ₱2,285.23
¥14,792.65
List Price:  ¥20,710.30
You save:  ¥5,917.65
MX$1,835.78
List Price:  MX$2,570.17
You save:  MX$734.38
QR366.82
List Price:  QR513.56
You save:  QR146.74
P1,430.96
List Price:  P2,003.40
You save:  P572.44
KSh12,952.70
List Price:  KSh18,134.30
You save:  KSh5,181.60
E£4,816.78
List Price:  E£6,743.69
You save:  E£1,926.90
ብር14,387.11
List Price:  ብር20,142.53
You save:  ብር5,755.42
Kz91,186.39
List Price:  Kz127,664.59
You save:  Kz36,478.20
CLP$95,570.44
List Price:  CLP$133,802.44
You save:  CLP$38,232
CN¥711.31
List Price:  CN¥995.87
You save:  CN¥284.55
RD$6,221.03
List Price:  RD$8,709.70
You save:  RD$2,488.66
DA12,950.21
List Price:  DA18,130.81
You save:  DA5,180.60
FJ$224.85
List Price:  FJ$314.80
You save:  FJ$89.95
Q766.29
List Price:  Q1,072.85
You save:  Q306.55
GY$20,926.15
List Price:  GY$29,297.44
You save:  GY$8,371.29
ISK kr12,156.78
List Price:  ISK kr17,019.98
You save:  ISK kr4,863.20
DH903.23
List Price:  DH1,264.56
You save:  DH361.32
L1,663.31
List Price:  L2,328.70
You save:  L665.39
ден5,229.59
List Price:  ден7,321.64
You save:  ден2,092.04
MOP$801.41
List Price:  MOP$1,122.01
You save:  MOP$320.59
N$1,743.36
List Price:  N$2,440.78
You save:  N$697.41
C$3,677.54
List Price:  C$5,148.70
You save:  C$1,471.16
रु14,094.94
List Price:  रु19,733.48
You save:  रु5,638.54
S/349.66
List Price:  S/489.54
You save:  S/139.87
K426.80
List Price:  K597.54
You save:  K170.74
SAR375
List Price:  SAR525.01
You save:  SAR150.01
ZK2,370.59
List Price:  ZK3,318.92
You save:  ZK948.33
L431.47
List Price:  L604.08
You save:  L172.60
Kč2,063.99
List Price:  Kč2,889.68
You save:  Kč825.68
Ft33,216.64
List Price:  Ft46,504.62
You save:  Ft13,287.98
SEK kr938.94
List Price:  SEK kr1,314.55
You save:  SEK kr375.61
ARS$147,416.76
List Price:  ARS$206,389.36
You save:  ARS$58,972.60
Bs691.25
List Price:  Bs967.78
You save:  Bs276.52
COP$390,251.14
List Price:  COP$546,367.20
You save:  COP$156,116.06
₡50,404.89
List Price:  ₡70,568.86
You save:  ₡20,163.97
L2,636.34
List Price:  L3,690.98
You save:  L1,054.64
₲716,255.91
List Price:  ₲1,002,786.92
You save:  ₲286,531.01
$U3,994.64
List Price:  $U5,592.65
You save:  $U1,598.01
zł362.46
List Price:  zł507.46
You save:  zł145
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.