Excel and Function
Excel and Function
AND Function
The AND function is a premade function in Excel, which returns TRUE or FALSE based on two or
more conditions.
Note: The AND function is often used together with the IF function.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
Check if the type is fire and has speed greater than 70:
2. Type =AND
5. Type ,
7. Hit enter
Note: You can add more conditions by repeating steps 5-6 before hitting enter.
Since the value in cell B2 is not "Fire" the first condition is FALSE.
Since the value in cell C2 is less than 70 the second condition is also FALSE.
All conditions need to be TRUE for the AND function to return TRUE.
The function can be repeated with the filling function for each row to perform the same check for each :
Now, each row has a check for Fire Type and Speed greater than 70:
Only Charmeleon and Charizard both have Fire type and speed greater than 70, so the function returns "TRUE".
ADVERTISEMENT
Combining the AND function with an IF function lets you check multiple conditions for the IF function:
1. Select cell C2
2. Type =IF
8. Type ,
10. Type ),
11. Specify the value "Yes" for when both conditions are TRUE
12. Type ,
13. Specify the value "No" for when either, or both, conditions are FALSE
Now each row has a check for both being Fire type and Speed greater than 70:
Only Charmeleon and Charizard both have Fire type and speed greater than 70, so the function returns "Yes".
The CONCAT function is used to link multiple cells without adding any delimiters between the combined cell
values.
It is typed =CONCAT
Note: Delimiters are spacing or symbols used to seperate content elements apart from each other.
Example of delimiters
Info: CONCAT is a new version of the old CONCATENATE function. Recent versions of Excel do not accept the old
CONCATENATE function as it is only compatible with earlier versions of Excel. To use COCATENATE in the latest
versions of Excel, use CONCAT.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
1. Select a cell E2
2. Type =CONCAT
Copy the values in the example above and try it on your own!
8. Hit enter
Note: The CONCAT function does not provide any delimiters between cell values used in the funtion. If you want
your cell values to be displayed with delimiters, you have to add the delimiters between the selected cells. You
can use any symbol as a demiliter, if you want the delimiter to be a space, enter " ".
The function returns the content of A2 and A3 separated with a " " dilimiter.
You can also use more symbols as a demilter, such as adding the word " and ".
The CONCAT function accepts cell values of both text and numbers, you can combine them in any way you
prefer.
Combine the cell values with text strings as delimiters to make the output more descriptive!
Excel COUNT Function
COUNT Function
The COUNT function is a premade function in Excel, which counts cells with numbers in a range.
It is typed =COUNT
Note: The COUNT function only counts cells with numbers, not cells with letters. The COUNTA function
is better used if the cells have letters.
1. Select a cell
2. Type =COUNT
4. Select a range
5. Hit enter
Apply the =COUNT function to range D2:D21. Counting the cells of Total stats, which is numbers only:
COUNT function, step by step:
1. Select D23
2. Type =COUNT
Note: The =COUNT function only counts cells with numbers in a range.
That's it! The =COUNT function successfully counted 20 cells with numbers.
Excel COUNTA Function
COUNTA Function
The COUNTA function is a premade function in Excel, which counts all cells in a range that has values, both
numbers and letters.
It is typed =COUNTA
1. Select a cell
2. Type =COUNTA
4. Select a range
5. Hit enter
Apply the =COUNTA function to range A2:A21, counting s by their names, which are letters only:
COUNTA function, step by step:
1. Select A23
2. Type =COUNTA
5. Hit enter
The COUNTA function has successfully counted 20 cells with values in the range A2:A21.
Lets apply the COUNTA function to D2:D21. Counting a range with numbers only.
That is great! The COUNTA function counts cells in a range with values both numbers and letters.
Excel COUNTBLANK Function
COUNTBLANK Function
The COUNTBLANK function is a premade function in Excel, which counts blank cells in a range.
It is typed =COUNTBLANK
1. Select a cell
2. Type =COUNTBLANK
4. Select a range
5. Hit enter
Apply the =COUNTBLANK function to range C2:C21, to find the s which do not have a 2nd Type:
COUNTBLANK function, step by step:
1. Select C23
2. Write =COUNTBLANK
5. Hit enter
The COUNTBLANK function successfully counted 8 blank cells in the range C2:C21.
Excel COUNTIF Function
COUNTIF Function
The COUNTIF function is a premade function in Excel, which counts cells as specified.
It is typed =COUNTIF
NOTE: The COUNTIF function can have basic or more advanced uses. This covers the basic use for how
to count specific numbers and words.
1. Select a cell
2. Type =COUNTIF
4. Select a range
5. Type ,
6. Select a cell (the criteria, the value that you want to count)
7. Hit enter
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
Apply the COUNTIF function to range B2:B21, to count how many s we have in the different types:
We want the COUNTIF function to count the types of s, in the range G5:G15:
The , is typed after the range is selected, which tells the function what you are looking to count.
The COUNTIF function has successfully counted 1 Grass , which is Victreebel (A4).
1. Select G6
2. Type =COUNTIF
3. Select B2:B21
4. Type (,)
6. Hit enter
That is great! The COUNTIF function has counted 6 Water s in B2:B21.
Let's count the rest of the types more effectively. We want to continue the function from G6:G15.
Making use of the Filling Function and Absolute References.
Step by step:
1. Double click G6
2. Lock the range references absolute (B2:B21). Type dollar signs before the columns and row. Type 4
dollar signs in total. =COUNTIF($B$2:$B$21,F6). Note: We want F6 to remain relative. Because we want
it to move downwards. Do not add dollar signs ($) to it.
3. Hit enter
A Non-Working Example
COUNTIFS Function
The COUNTIFS function is a premade function in Excel, which counts cells in a range based on one or
more true or false condition.
It is typed =COUNTIFS:
The conditions are referred to as critera1, criteria2, .. and so on, which can check things like:
The criteria_range1, criteria_range2, and so on, are the ranges where the function check for the
conditions.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
2. Type =COUNTIFS
4. Specify the range for the type B2:B759 (the Type 1 values)
5. Type ,
6. Specify the criteria (the cell E3, which has the value "Water")
7. Type ,
8. Specify the range for the second conditionC2:C759 (the Generation values)
9. Type ,
10. Specify the criteria (the cell F3, which has the value "1")
Note: You can add more conditions by repeating steps 7-10 before hitting enter.
The function now counts the number of 1st Generation Water type .
The function can be repeated for Water type for the following Generations to compare them:
Now, we can see the total number of Water type between generations 1-4:
Excel IF Function
IF Function
The IF function is a premade function in Excel, which returns values based on a true or false condition.
Note: You can decide both the return values and the condition.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
2. Type =IF
5. Type ,
7. Type ,
8. Specify the value "No" for when the condition is FALSE
9. Hit enter
Since the value in cell B2 is "Grass", the condition is true and the function will return "Yes".
The function can be repeated with the filling function for each row to perform the same check for each :
2. Type =IF
5. Type ,
7. Type ,
9. Hit enter
Since the value in cell C2 is 318, the condition is false and the function will return "No".
The function can be repeated with the filling function for each row to perform the same check for each :
Now, each row has a check for having more than 500 total stats:
Excel IFS Function
IFS Function
The IFS function is a premade function in Excel, which returns values based on one or
more true or false conditions.
The conditions are referred to as logical_test1, logical_test2, ..., which can check things like:
Note: More than one condition can be true so the function will return the value for the first true
condition.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
2. Type =IFS
5. Type ,
6. Specify the value "Fast" for when the first condition is TRUE
7. Type ,
10. Specify the value "Normal" for when the second condition is TRUE
11. Type ,
13. Type ,
14. Specify the value "Slow" for when the third condition is TRUE
Since the value in cell C2 is "45", the first and second conditions are false, and third condition
is true (less than or equal to 50), the function will return "Slow".
The function can be repeated with the filling function for each row to perform the same check for each :
Note: The third condition <=50 includes = so that 50 is included in "less than or equal to 50"
Now, each has a speed category:
Excel LEFT Function
LEFT Function
The LEFT function is used to retrieve a chosen amount of characters, counting from the left side of an
Excel cell. The chosen number has to be greater than 0 and is set to 1 by default.
It is typed =LEFT
=LEFT(cell)
To retrieve values from the left side of an Excel cell, use LEFT.
1. Select a cell E2
2. Type =LEFT
Copy the values in the example above and try it on your own!
5. Hit enter
=LEFT(A2) uses the default funcion of LEFT and retrieves the first symbol from the A2 cell.
1. Select a cell E2
2. Type =LEFT
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
4. Enter the cell name (A2) and define the length of characters you want to retrieve, using a , as a delimiter
(A2,3)
5. Hit enter
1. Select a cell E2
2. Type =LEFT
4. Select the cells (A2:A4) and define the length of characters you want to retrieve, using a , as a delimiter
(A2:A4,3)
5. Hit enter
The function returns the first 3 characters from each cell within the range A2:A4.
Excel LOWER Function
LOWER Function
The LOWER function is used to lowercase text in a cell.
Changing the letter case of your cell values can be great when there is a lot of case inconsistency among
the cell inputs or when preparing your dataset for case-sensitive usage.
It is typed =LOWER
=LOWER(cell)
A is uppercase.
a is lowercase.
1. Select a cell E2
2. Type =LOWER
Copy the values in the example above and try it on your own!
2. Hit enter
The letter case of cell A2 has been changed!
Step 3) Define the range to use the LOWER function on multiple cells
4. Hit enter
Excel MAX Function
MAX Function
The MAX function is a premade function in Excel, which finds the highest number in a range.
It is typed =MAX
The function ignores cells with text. It will only work for cells with numbers.
Note: There is another function called MIN, which finds the lowest value in a range, the opposite
of MAX.
2. Type =MAX
5. Hit enter
Find the which has the highest total stats in the range D2:D21:
That's great! The function has successfully found the highest value, 525. Cloyster has the highest Total
stats of the s in the range D2:D21.
Let's add text to a cell in the range D2:21 to see what happens. Type Alakazam to D8.
Nice going. The function ignores the text typed in the range. 510 is returned as the new highest value,
since the old one was replaced with text. Poliwrath is now the with the highest Total stats in the range D2:D21.
Excel MEDIAN Function
MEDIAN Function
The MEDIAN function is a premade function in Excel, which returns the middle value in the data.
It is typed =MEDIAN
Note: The median is a type of average value, which describes where the center of the data is located.
You can learn about median in our Statistics Median Tutorial.
Calculating the median manually requires that the data is sorted and arranged from low to high. This is
not necessary using the MEDIAN function, it does it for you.
2. Type =MEDIAN
5. Hit enter
Great! You successfully found the median using the =MEDIAN function.
Note that it found the value in the middle of the data, which is D2(2), the one that is marked red:
Excel MIN Function
MIN Function
The MIN function is a premade function in Excel, which finds the lowest number in a range.
It is typed =MIN
The function ignores cells with text. It will only work for cells with numbers.
Note: There is another function called MAX, which finds the highest value in a range, the opposite
of MIN.
2. Type =MIN
5. Hit enter
Find the which has the lowest total stats in the range D2:D21:
Look at that! The function has successfully found the lowest value, 200. Magikarp has the lowest Total
stats of the s in the range D2:D21.
Let's add text to a cell in the range D2:21 to see what happens. Type Kadabra to D21.
Right on! The function ignores the text typed in the range. 253 is returned as the new lowest value, as
the old one was replaced with text. Rattata is now the with the lowest Total stats in the range D2:D21.
Excel MODE Function
MODE Function
The MODE function is a premade function in Excel, which is used to find the number seen most times.
It is typed =MODE.SNGL
Note: The mode is a type of average value, which describes where most of the data is located. You can
read more about mode in our: Statistics Mode Tutorial.
Let's have a look at an example where we help the trainers to calculate the mode of numbers of
Pokeballs.
2. Type =MODE
5. Hit enter
It returns the number 1 which is seen 7x times. The closest number to it is 3 and 4 which are seen 3x
times each.
NPV Function
The NPV function is used to calculate the Net Present Value (NPV)
It is typed =NPV
To calculate and find out whether an investment is positive in the future, use NPV.
The rate is the required Discount Rate that you want to use.
2. Type 10%
3. Hit enter
5. Type =NPV
Copy the values in the example above and try it on your own!
Let us add the rate and the values from 1 to 10 to the function.
8. Type , or ;
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
OR Function
The OR function is a premade function in Excel, which returns TRUE or FALSE based on two or
more conditions.
It is typed =OR.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
Example OR Function
2. Type =OR
5. Type ,
7. Hit enter
Note: You can add more conditions by repeating steps 5-6 before hitting enter.
Since the value in cell B2 is not "Water" the first condition is FALSE.
Since the value in cell C2 is less than 60 the second condition is also FALSE.
At least one condition need to be TRUE for the OR function to return TRUE.
The function can be repeated with the filling function for each row to perform the same check for each :
Now, each row has a check for Water Type or Defense greater than 60:
For example:
Ivysaur is not Water type, but it has more than 60 defense, so the function returns "TRUE".
Charmeleon is not Water type, and has less than 60 defense, so the function returns "FALSE"
Wartortle is both Water type and has more than 60 defense, so the function returns "TRUE"
Excel RAND Function
RAND Function
It is typed =RAND
You can define limits, create random data sets and much more.
=RAND()
To use the RAND function to receive a random number up to a certain value, write:
=RAND()*value
=INT(RAND())
1. Select a cell A1
2. Type =RAND
2. Hit enter
2. Hit enter
A random whole number between 0 and 10 has been generated!
1. Drag the bottom right corner of the cell down to generate more numbers.
RIGHT Function
The RIGHT function is used to retrieve a chosen amount of characters, counting from the right side of an
Excel cell. The chosen number has to be greater than 0 and is set to 1 by default.
It is typed =RIGHT
=RIGHT(cell)
To retrieve values from the right side of an Excel cell, use RIGHT.
1. Select a cell E2
2. Type =RIGHT
Copy the values in the example above and try it on your own!
5. Hit enter
=RIGHT(A2) uses the default funcion of RIGHT and retrieves the last symbol from the A2 cell.
1. Select a cell E2
2. Type =RIGHT
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
4. Enter the cell name (A2) and define the length of characters you want to retrieve, using a , as a delimiter
(A2,3)
5. Hit enter
1. Select a cell E2
2. Type =RIGHT
4. Select the cells (A2:A4) and define the length of characters you want to retrieve, using a , as a delimiter
(A2:A4,3)
5. Hit enter
The function returns the last 3 symbols from each cell within the range A2:A4.
Excel STDEV.P Function
STDEV.P Function
The STDEV.P function is a premade function in Excel, which calculates the Standard Deviation (Std) for
the entire population.
It is typed =STDEV.P
Note: Standard deviation (σ) measures how far a 'typical' observation is from the average of the data
(μ). You can read more about standard deviation in our Statistics - Standard Deviation Tutorial.
Tip: There is another function called STDEV.S that can be used if you have the data for a sample.
2. Type =STDEV.P
5. Hit enter
STDEV.S Function
The STDEV.S function is a premade function in Excel, which calculates the Standard Deviation (Std) for a
sample.
It is typed =STDEV.S
Note: Standard deviation (σ) measures how far a 'typical' observation is from the average of the data
(μ). You can read more about standard deviation in our Statistics - Standard Deviation Tutorial.
Tip: There is another function called STDEV.P that can be used if you have the data for the entire
population.
2. Type =STDEV.S
5. Hit enter
Find the Standard Deviation for the sample of total stats in the range E2:E21:
That's the way! The STDEV.S function has successfully returned the Standard Deviation 113,2319 for
the sample of Total stats.
Excel TRIM Function
TRIM Function
The TRIM function is premade in Excel and used to remove irregular text spacing and keep single spaces
between words.
It is typed =TRIM
=TRIM(cell)
Note: Irregular spacing is unnecessary spacing within the dataset that can occur before, after or
between text or numbers within a cell.
Use Trim to tidy up irregular spaces in the dataset within the range A2:C21.
Note: To define the range, separate the range values with a colon symbol :
1. Select a cell E2
2. Type =TRIM
5. Hit enter
Try it yourself!
Copy the values in the example above and try it on your own!
Use =TRIM function by following the steps in the example above to format the text:
VLOOKUP Function
The VLOOKUP function is a premade function in Excel, which allows searches across columns.
Note: The column which holds the data used to lookup must always be to the left.
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
Col_index_num: The data which is being looked up. The input is the number of the column, counted
from the left:
Range_lookup: TRUE if numbers (1) or FALSE if text (0).
2. Type =VLOOKUP
5. Type (,)
7. Type (,)
8. Type the number of the column, counted from the left (2)
11. Enter a value in the cell selected for the Lookup_value H3(7)
Use the VLOOKUP function to find the Pokemon names based on their ID#:
H4 is where the search result is displayed. In this case, the Pokemons names based on their ID#.
H3 selected as lookup_value. This is the cell where the search query is entered. In this case the
Pokemons ID#.
The range of the table is marked at table_array, in this example A2:E21.
The number 2 is entered as col_index_number. This is the second column from the left and is the data
that is being looked up.
XOR Function
The XOR function is a premade function in Excel, which returns TRUE or FALSE based on two or
more conditions.
Note: The XOR function is often used together with the IF function.
It is typed =XOR:
For two conditions, you can think of the XOR function as: "either this or that, but not both"
Note: The different parts of the function are separated by a symbol, like comma , or semicolon ;
Check if the Pokemon type is either Fire type OR has HP less than 60, but not both:
2. Type =XOR
5. Type ,
Note: You can add more conditions by repeating steps 5-6 before hitting enter.
The XOR function returns "TRUE" if an odd number (1,3,5,..) of conditions are TRUE.
Since the value in cell B2 is not "Fire" the first condition is FALSE.
Since the value in cell C2 is less than 60 the second condition is TRUE.
For two conditions, only one condition should to be TRUE for the XOR function to return TRUE.
The function can be repeated with the filling function for each row to perform the same check for each
Pokemon:
Now, each row has a check for Fire Type or HP less than 60, but not both:
For example:
Ivysaur is not Fire type, but it also does not have less than 60 defense, so the function returns "FALSE".
Charmeleon is Fire type, and has less than 60 defense, so the function returns "FALSE"
Wartortle is not Fire type, but has less than 60 defense, so the function returns "TRUE"
Example XOR Function (with IF)
Combining the XOR function with an IF function lets you check multiple conditions for the IF function:
1. Select cell C2
2. Type =IF
4. Type XOR
8. Type ,
10. Type ),
11. Specify the value "Yes" for when just one condition is TRUE
12. Type ,
13. Specify the value "No" for when both are FALSE, or TRUE at the same time
Now, each row has a check for Water Type or Defense greater than 60, but not both:
For example:
Ivysaur is not Fire type, but it also does not have less than 60 defense, so the function returns "No".
Charmeleon is Fire type, and has less than 60 defense, so the function returns "No"
Wartortle is not Fire type, but has less than 60 defense, so the function returns "Yes
How to Convert Time to Seconds using Excel
86400 Explained
Example
00:01 * 86400 = 60
The example returns 60 because one minute (00:01) is 60 seconds.
Explanation
Each hour can be understood as a percentage of the total hours of the day.
01:00 = 1/24
02:00 = 2/24
03:00 = 3/24
and so on.
Example (15:00)
Duplicate entries are values that two or more are the same.
Example
This helps so that you do not break the relationship between the cells.
Press the "OK" button once you have selected the columns.
Duplicates removed
When the columns have been selected, and you have pressed the "OK" button, the duplicates have been
removed.
Example:
Tip: Use the Remove Duplicate function with care for large data sets.