The IF function returns one value if a condition is true and another if false. Nested IFs allow checking multiple conditions. The LEFT function extracts characters from the left of a text. CONCATENATE joins multiple texts into one cell. DATEDIF calculates the number of days, months, or years between dates. COUNTIF counts cells meeting a criteria.
1. IF Function
A Logical Function that returns one value if a condition is true and another value if it’s false.
Example: In this example, if the student got a grade below 76,
he will be marked as FAILED, otherwise he will get a PASSED mark.
Formula : =IF(B2<76,”FAILED”,”PASSED”)
The Condition
Answer if Condition is TRUE
Answer if Condition is FALSE
2. NESTED IFs
The Logical Function to use if you are trying to meet more than 1 condition
In this example, there are remarks for reaching a specific grade. In order to satisfy this, we will use multiple IFs or
also known as Nested IFs
Formula: =IF(B2<70,”F”,IF(B2<80,”D”,IF(B2<85,”C”,”B”)))
1st Condition (If grade is below 70)
Answer if 1st Condition is TRUE
2nd Condition (grade is below 80)
Answer if 2nd Condition is TRUE
3rd Condition (grade is below 85)
Answer if 3rd Condition is TRUE
Answer if all 3
Conditions
are not met
3. LEFT Function
This Function extracts a number of characters starting from the left of the text
In this example, we will extract the first letter of the
Middle Name in order to get the Middle Initial
Formula : =LEFT(A2,1)
The text where to get the character/s
The number of characters to be extracted starting from the Left
4. CONCATENATE
The Concatenate functions joins two or more text strings into one
In this example, we will merge the First Name, Middle Initial,
and Last Name into a Single Cell (located on column D)
Formula : =CONCATENATE(A2,” “,B2,” “,C2)
First Name
Space to Separate the First Name and Middle Initial
Middle Initial
Space to Separate the Middle Initial and Last Name
Last Name
5. DatedIF
The DatedIF function calculates the number of days, months, or years between two dates
In order to compute the Age, we will use:
Formula: =DATEDIF(A2,today(),”Y”)
Start Date
Note: The Function Today() will display the current date End Date
Type: Y if you are computing for # of Years
D if you are computing for # of Days
M if you are computing for # of Months
6. COUNTIF
The COUNTIF function counts the number of cells that meet the criteria you specify
To count the number of Engineers in the list, we will use
the COUNTIF Function
Formula: =COUNTIF($A$1:$A$7,”Engineer”)
The range of cells to used to count a specific criteria
Note that the $ sign was placed on the cell range.
This is to set the range in Absolute (Fixed) value
Criteria to count