top of page

EXCEL : Logical Formula & Syntax

  • Writer: Com Bird
    Com Bird
  • Oct 27, 2023
  • 2 min read

Updated: Jan 4, 2024


ree


1) AND function


Description

Use the AND function, one of the logical functions, to determine if all conditions in a test are TRUE.


Syntax

AND(Logical1,[Logical2],…)


2) FALSE function


Description

This article describes the formula syntax and usage of the FALSE function in Microsoft Excel.


Syntax

FALSE()


3) IF function


Description

The IF function is one of the most popular functions in Excel, and it allows you to make logical comparisons between a value and what you expect. So an IF statement can have two results. The first result is if your comparison is True, the second if your comparison is False. For example, =IF(C2=”Yes”,1,2) says IF(C2 = Yes, then return a 1, otherwise return a 2).


Syntax

IF(logical_test, value_if_true, [value_if_false])


4) IFERROR function


Description

You can use the IFERROR function to trap and handle errors in a formula. IFERROR returns a value you specify if a formula evaluates to an error; otherwise, it returns the result of the formula.


Syntax

IFERROR(value, value_if_error)


5) IFNA function


Description

The IFNA function returns the value you specify if a formula returns the #N/A error value; otherwise it returns the result of the formula.


Syntax

IFNA(value, value_if_na)


6) IFS function


Description

The IFS function checks whether one or more conditions are met, and returns a value that corresponds to the first TRUE condition. IFS can take the place of multiple nested IF statements, and is much easier to read with multiple conditions.


Syntax

=IFS([Something is True1, Value if True1,Something is True2,Value if True2,Something is True3,Value if True3)


7) LET function


Description

The LET function assigns names to calculation results. This allows storing intermediate calculations, values, or defining names inside a formula. These names only apply within the scope of the LET function. Similar to variables in programming, LET is accomplished through Excel’s native formula syntax. To use the LET function in Excel, you define pairs of names and associated values, and a calculation that uses them all. You must define at least one name/value pair (a variable), and LET supports up to 126..


Syntax

=LET(name1, name_value1, calculation_or_name2, [name_value2, calculation_or_name3...])


8) NOT function


Description

Use the NOT function, one of the logical functions, when you want to make sure one value is not equal to another.


Syntax

NOT(logical)


9) OR function


Description

Use the OR function, one of the logical functions, to determine if any conditions in a test are TRUE.


Syntax

OR(logical1, [logical2], ...)


10) SWITCH function


Description

The SWITCH function evaluates one value (called the expression) against a list of values, and returns the result corresponding to the first matching value. If there is no match, an optional default value may be returned


Syntax

SWITCH(expression, value1, result1, [default or value2, result2],…[default or value3, result3])


11) TRUE function


Description

Returns the logical value TRUE. You can use this function when you want to return the value TRUE based on a condition. For example:


=IF(A1=1,TRUE())


You can also enter the value TRUE directly into cells and formulas without using this function. For example:


=IF(A1=1,TRUE)


If the condition is met, Excel returns TRUE in both examples. If the condition is not met, Excel returns FALSE in both examples.


Syntax

TRUE()


12) XOR function


Description

The XOR function returns a logical Exclusive Or of all arguments..


Syntax

XOR(logical1, [logical2],…)




 
 
 

Comments


bottom of page