Chapter 6. Controlling Program Flow
Create Comparisons
Comparison operators allow you to compare two expressions. Comparison expressions always return either True
or False
. For example, the expression, A = B, compares the variable A
to the variable B
. It then returns True
if the value stored in variable A
is equal to the value stored in variable B
, or False
if the value stored in variable A
is not equal to the value stored in variable B
.
When writing a comparison expression, you use a comparison operator. You place the comparison operator between the expressions you want to compare. For example, you can use the equal (=) sign to determine if two values are equal or you can use the not equal (<>) sign to determine if values are not equal.
The following ...
Get Excel® Programming: Your visual blueprint™ for creating interactive spreadsheets now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.