Reminder: Please download the files that were given.
I would first strongly recommend reading this guide on Excel formulas. For each of the functions discussed below, read the reference guides from Microsoft and Google .
Getting Started
Every function has a unique name and purpose.
- For example, SUM() =/= SUMIF() =/= SUMIFS()
Functions usually take in specific inputs called "parameters" or "arguments". These parameters can be:
- numbers,
- text,
- dates,
- cell references,
- cell ranges,
- and even other formulas and functions!
This Microsoft article
can help explain more.
For example, understanding how the Function Dialog (fx) Box works as shown below can help:
This web page serves as a tutorial guide covering some common key functions you should know.
A) SUM Function |
Reference guideAmong the most widely used functions is the SUM() function.
To add the constant numbers 1, 3, and 5, we can simply write =SUM(1,3,5)
Suppose we have to find the sum of the following data:
Salesperson // A1 | Quarter 1 | Quarter 2 | Quarter 3 | Quarter 4 | Total |
---|---|---|---|---|---|
Brian | $52,000 | $73,000 | $72,000 | $18,000 | ??? |
There are a few ways we can add these numbers to get the total. We can:
-
Using a Manual Addition Formula:
=B2 + C2 + D2 + E2
Each quarters sales figure is added individually via a formula -
Use the SUM() function on each individual number:
=SUM(B2,C2,D2,E2)
Each quarters sales figure is added individually via the SUM() function -
Use the SUM() function with a range:
=SUM(B2:E2)
The best way to calculate the total is by summing the values in cells B2 to E2, which contain the sales figures for Quarters 1 to 4.
Few things to note:
- The word "SUM" doesn’t need to be in all caps, but it's common to write it that way.
- The SUM function ignores cells with text.
Let's take a look at a few examples:
SUM() Example #1: Grocery Cart
Suppose we have the following grocery cart:
Grocery Cart | Price |
---|---|
Bread | $3 |
Milk | $4 |
Eggs | $6 |
Water | $4 |
What function would output our total?
SUM() Example #2: Movie Theaters
Let's take a look at another example for a table of movies:
Year // A1 | Movie | Director | Box Office Earnings |
---|---|---|---|
1999 | Star Wars: Episode I - The Phantom Menace | George Lucas | $7,340,743,186 |
1998 | Titanic | James Cameron | $6,696,383,983 |
1997 | Men in Black | Barry Sonnenfeld | $6,077,250,085 |
1996 | Independence Day | Roland Emmerich | $5,600,750,973 |
1995 | Batman Forever | Joel Schumacher | $5,106,129,264 |
1994 | The Lion King | Roger Allers, Rob Minkoff | $5,061,909,583 |
1993 | Jurassic Park | Steven Spielberg | $4,823,116,106 |
1992 | Batman Returns | Tim Burton | $4,519,644,026 |
1991 | Terminator 2: Judgment Day | James Cameron | $4,336,073,530 |
1990 | Ghost | Jerry Zucker | $4,326,824,577 |
1989 | Batman | Tim Burton | $4,084,060,815 |
In the above example,
try to find the sum of all movie sales.
=SUM(D2:D12)
SUM() Example #3: Calculating Monthly Budget
MONTHLY INCOME
Item // A1 | Amount // B1 |
---|---|
Income 1 (Ret/VA pay) | $1,840.00 |
Income 2 | $0.00 |
Other | $0.00 |
MONTHLY EXPENSES
Item // D1 | Amount // E1 |
---|---|
Rent/mortgage | $0.00 |
Electric | $0.00 |
Gas | $0.00 |
Cell phone | $0.00 |
Groceries | $0.00 |
Car payment | $0.00 |
Auto expenses | $0.00 |
Student loans | $0.00 |
Credit cards | $0.00 |
Auto Insurance | $0.00 |
Personal care | $0.00 |
Entertainment | $0.00 |
Miscellaneous | $0.00 |
Credit cards | $0.00 |
SBP | $0.00 |
=SUM(E:E)
also can work.
B) AVERAGE Function |
Reference guideThe AVERAGE() function returns the average (arithmetic mean) of each of the arguments.
It is typed as '=AVERAGE' and is formatted as:
=AVERAGE(value1, value2, [value3, ...])
Looking back at our earlier SUM example, let's now find the AVERAGE of the following data:
Salesperson // A1 | Quarter 1 | Quarter 2 | Quarter 3 | Quarter 4 | Total | Average |
---|---|---|---|---|---|---|
Brian | $52,000 | $73,000 | $72,000 | $18,000 | =SUM(B2:E2) | ??? |
- =AVERAGE(B2,C2, D2, E2)
- =AVERAGE(B2:E2)
Let's take a look at a few examples:
AVERAGE() Example #1: Averaging Salaries
Calculate the average salary of the three employees.
Name // A1 | Position? | Salary |
---|---|---|
Raza | Trainer | $1M |
Zehra | English Teacher | $2M |
Sarah | Director of Training | $4M |
SUM? // E1 | =SUM(C2:C4) | |
---|---|---|
AVERAGE | (AVERAGE function goes here) |
Notice that the average function uses the same range as that of the SUM function.
AVERAGE() Example #2: Average of Box Office Earnings.
Looking at the table of movies used in SUM() Example #2, calculate the AVERAGE Box Office Earnings.
AVERAGE() Example #3: Fictional Savings Table
Below is a fictional savings table showing monthly savings:
Month // A1 | Amount Saved // B1 |
---|---|
January | $1,200 |
February | $1,300 |
March | $1,000 |
April | $1,400 |
May | $1,300 |
June | $1,100 |
July | $1,000 |
August | $1,200 |
September | $1,500 |
October | $1,300 |
November | $800 |
December | $500 |
Total | $14,600 // =SUM(B2:B13) |
Average: | ??? |
Q: What is the average amount saved per month?
Note: Make sure to exclude the total cell from the range used in the AVERAGE() function.
C) CONCAT Function |
Reference guideA text function that concatenates (joins) values. The values are not limited to text as it can join numbers too.
NOTE: There are no delimiters added between the combined cell values.
A delimiter is a character/symbol used to seperate values apart from each other e.g. / \ , | -
It is typed as '=CONCAT' and it is a new version of the old CONCATENATE() function. It is formatted as:
=CONCAT(value1, value2, [value3, ...])
This operator is equivalent to using the concatenation operator (&) as shown below:
north // A1 |
west // A2 |
= CONCAT(A1,A2) // Output: northwest |
north // A1 |
west // A2 |
= A1 & A2 // Output: northwest |
You can use the CONCAT function to join text and numbers. For example, a manufacturer part number (MPN) is a unique alphanumeric code that manufacturers assign to their products for easy identification.
Unique Code | Unique Letters | Combination? |
---|---|---|
00638 | NIC | =CONCAT(A2,B2) // Output: 00638NIC |
Note: The CONCAT() function improves on older CONCATENATE() function by supporting ranges. For example, to combine values from A1, A2, and A3, you can reference the range as =CONCAT(A1:A3)
Use the TEXTJOIN function to join multiple values with a delimiter. It does everything CONCAT does but also lets you add a delimiter and skip empty values.
CONCAT Example #1: Full Name
Find the full name:
First Name // A1 | Last Name | Full Name |
---|---|---|
Jane | Doe | ??? // Output: Last, First |
D) COUNTIF Function |
Reference guideThe COUNTIF function is a built-in "statistical" function that counts the number of cells meeting a given criterion/condition. The function returns a number representing cells counted
Function Syntax:=COUNTIF(range, criterion)It is typed =COUNTIF which has two parts:
- the range of cells to count (i.e. where do you want to look)
- the criteria/condition for what do you want to look for
As an example, let's take a look at a grocery list of items
Grocery List | Apples | Oranges | Cookies | Apples | Bananas | Milk |
---|
Suppose we want to find the number of times the word "Apples" show up. We can use the COUNTIF function
= COUNTIF(B1:G1, "Apples") // Output: 2
NOTE: Since the function criteria requires an exact match, we cannot use the singular form "Apple" as there are no exact matches available.
Spelling Case doesn't matter but actual characters used does.
COUNTIF Example #1: Movies made by James Camerons
Using our earlier example with the table of movies, find out how many films were made by James Cameron
Solution:COUNTIF Example #2: Count of Assigned Tasks
Given a list of tasks assigned to various individuals, find out how many tasks are assigned to Danny Brown:
Task | Assigned To |
---|---|
Task 1: | Peter Smith |
Task 2: | Danny Brown |
Task 3: | Alex Day |
Task 4: | Sam Ramirez |
Task 5: | D. Brown |
Task 6: | Alexander Day |
Task 7: | Daniel Brown |
Task 8: | P. Smith |
Task 9: | Mr. Brown |
Solution:
The asterisk (*) is used to find cells with any characters before or after,
as shown in the example.
Since Danny's name is written in various ways, we can use "Brown" as the search criteria:
COUNTIF Example #3: Years of Service
Use the COUNTIF function in Excel to count the number of
employees with Years
of Service over 20.
Employee | Hire Date | Years of Service |
---|---|---|
Claire Watson | 2/21/2010 | 14.7 |
Paulette Diaz | 9/16/2011 | 13.1 |
Gwen Patrick | 7/8/2000 | 24.3 |
Cecelia Nash | 4/28/2001 | 23.5 |
Terrance Reyes | 3/21/2004 | 20.6 |
COUNTIF Example #4: Checking customers' dues.
As part of the hotel staff, you are responsible for checking customers' dues.
How many guests have a balance exceeding $1,300 based on the records?
Name | Arrival Date | Balance |
---|---|---|
Austin | 06-16 | $640 |
Denton | 06-14 | $480 |
Hickman | 06-12 | $760 |
Littleton | 06-15 | $1,340 |
Shah | 06-12 | $1,200 |
Swatz | 06-18 | $1,100 |
Whitson | 06-14 | $960 |
E) SUMIF Function |
Reference guideThe SUMIF function returns the sum of values in a range that fit in a group/condition a.k.a. a conditional sum.
Function Syntax:=SUMIF(range, criteria, [sum_range])It is typed =SUMIF and takes in 3 arguments:
- the range of cells that the criteria is applied to.
- the specific criteria that we want to look for in the previously defined range.
- the actual range of cells to add
The sum range should be the same size and shape as range.
NOTE: Sorting the data by any column will not make a difference to the final output.
Let's take a look at an example:
Quarter // A1 | Product | Total Sales |
---|---|---|
Q1 | Cameras | $97,236.00 |
Q1 | Desktops | $230,920.00 |
Q1 | Laptops | $238,374.00 |
Q1 | Printers | $26,536.00 |
Q2 | Cameras | $174,933.00 |
Q2 | Desktops | $225,765.00 |
Q2 | Laptops | $353,772.00 |
Q2 | Printers | $166,616.00 |
Q3 | Cameras | $51,660.00 |
Q3 | Desktops | $165,462.00 |
Q3 | Laptops | $271,746.00 |
Q3 | Printers | $70,512.00 |
Q4 | Cameras | $46,944.00 |
Q4 | Desktops | $180,880.00 |
Q4 | Laptops | $84,840.00 |
Q4 | Printers | $51,092.00 |
Suppose we want to find all total sales for Q2. We can write the SUMIF Function as:
SUMIF Example #1: Find Laptop Sales
Using our earlier example,
find the sum of total Laptop sales.
SUMIF Example #2: Conditional Sum of Box Office Earnings for James Cameron.
Using the table of movies in SUM() Example #2,
find the conditional sum of box office earnings for James Cameron.
SUMIF Example #3: Sports Registration Summary
Suppose we have a list of people with their registration fees:
Receipt # // A1 | Member | Sport | Registrations |
---|---|---|---|
1 | Cook, Kevin | Football | $50.00 |
2 | Flint, Brian | Baseball | $40.00 |
3 | Miller, Susan | Volleyball | $25.00 |
4 | Miller, Susan | Tennis | $30.00 |
5 | Wakefield, Randy | Basketball | $50.00 |
6 | Cook, Kevin | Volleyball | $25.00 |
7 | Cook, Kevin | Tennis | $30.00 |
8 | Shea, Mark | Football | $50.00 |
9 | Christianson, Thor | Basketball | $50.00 |
10 | Bellows, Sam | Tennis | $30.00 |
11 | Bellows, Sam | Volleyball | $25.00 |
12 | Flint, Brian | Tennis | $30.00 |
13 | Shea, Mark | Volleyball | $25.00 |
14 | Sloat, Randy | Basketball | $50.00 |
15 | Christensen, Thor | Baseball | $40.00 |
16 | Smith, Sheila | Tennis | $30.00 |
17 | Smith, Sheila | Volleyball | $25.00 |
18 | Gates, Greg | Football | $50.00 |
19 | Gates, Greg | Volleyball | $25.00 |
20 | Moorefield, John | Baseball | $40.00 |
21 | Lopez, Cindy | Tennis | $30.00 |
22 | Guerrero, Maria | Tennis | $30.00 |
23 | Sloat, Randy | Football | $50.00 |
24 | Worldly, Diane | Volleyball | $25.00 |
25 | Grey, John | Football | $50.00 |
26 | Grey, John | Baseball | $40.00 |
27 | Flint, Brian | Basketball | $50.00 |
28 | Bower, Doug | Tennis | $30.00 |
29 | Long, Rhonda | Volleyball | $25.00 |
30 | Christensen, Thor | Tennis | $30.00 |
How much money was generated for the Tennis sport?
SUMIF Example #4: Employee Table
Below we have a list of employees:
Employee Name // A1 | Status | Department | Hire Date | Salary | Job Rating |
---|---|---|---|---|---|
Abbott, James | Contract | Quality Control | 24-Jul-01 | 77,700 | 5 |
Adams, David | Full Time | Quality Control | 1-Oct-13 | 109,640 | 5 |
Adkins, Michael | Full Time | Manufacturing | 16-Apr-04 | 81,640 | 4 |
Aguilar, Kevin | Part Time | Operations | 12-Feb-06 | 65,210 | 5 |
Alexander, Charles | Full Time | Project & Contract Services | 14-Feb-14 | 85,620 | 5 |
Alvarado, Sonia | Contract | Operations | 2-Jul-01 | 64,960 | 4 |
Anderson, Teason | Contract | Quality Assurance | 16-Mar-97 | 87,290 | 3 |
Anthony, Robert | Contract | Quality Control | 13-Aug-13 | 42,490 | 5 |
Atkinson, Danielle | Full Time | Process Development | 22-Aug-09 | 114,750 | 3 |
What is the sum of salary if Status is Contract?
Solution:F) IF Function |
Reference guideThe IF function returns one of two values: one value if the condition is TRUE and another value if the condition is FALSE.
Function Syntax:=IF(logical_test, [value_if_true], [value_if_false])It is typed =IF and takes in 3 arguments:
- Logical test is the condition/criteria to look for, with the result always evaluating to either TRUE or FALSE
- [value_if_true] is the value to return when logical_test returns TRUE.
- [value_if_false] The value to return when logical_test returns FALSE.
Please look at the following example:
Expense Worksheet
Month // A1 | Projected Expense | Actual Expense | Cost Variance (Projected - Actual) | Over/Under Budget |
---|---|---|---|---|
Jan | $800 | $921 | -121 |
??? Output: Over Budget |
Feb | $700 | $324 | 376 |
??? Output: Under Budget |
Mar | $500 | $638 | -138 |
??? Output: Over Budget |
Apr | $600 | $174 | 426 |
??? Output: Under Budget |
May | $450 | $500 | -50 |
??? Output: Over Budget |
In the above example, depending on the cost variance, the answer will be 1 of 2 answers: "Over Budget" or "Under Budget." We can express this in 2 different ways:
-
If the output is greater than 0, output "Under Budget". Else output "Over Budget"
=IF(D1>0,"Under Budget","Over Budget") -
If the output is less than 0, output "Over Budget". Else output "Under Budget"
=IF(D1<0,"Over Budget","Under Budget")
Let's take a look at a few examples:
IF Example #1: Output Pass/Fail
If the passing score of an exam is 70, what result should be filled in the 'Result' column for cells C2:C4?
Name // A1 | Score | Result |
---|---|---|
Anderson | 92 | ??? // Output: Pass |
Bautista | 85 | ??? // Output: Pass |
Block | 65 | ??? // Output: Fail |
Name // A1 | Score | Result |
---|---|---|
Anderson | 92 | =IF(B2>=70,"Pass","Fail") // Output: Pass |
Bautista | 85 | =IF(B3>=70,"Pass","Fail") // Output: Pass |
Block | 65 | =IF(B4>=70,"Pass","Fail") // Output: Fail |
IF Example #2: RSVP
Let's take a look at another example
to find if 2 or more people RSVP'd:
Person | Event RSVP? |
---|---|
Christine | Accepted |
Brandon | Declined |
Yolanda | Declined |
Raquel | Accepted |
Camille | Accepted |
Did more than 2 people RSVP? | |
---|---|
??? |
// Output: Yes, More than 2 RSVP'd
IF Example #3: Finding the Goal Bonus
Bonus Rate: // A1 | 1% |
---|
Name // A3 | Total // B3 | Goal // C3 | Goal Bonus? // D3 |
---|---|---|---|
Mullins | $368,575 | $325,000 | ??? // Output: Pass |
Little | $281,001 | $275,000 | ??? // Output: Pass |
Brooke | $371,193 | $400,000 | ??? // Output: Fail |
Brooke | $271,091 | $250,000 | ??? // Output: Fail |
What functions would we write in cells D4:D7?
IF Example #4: IF Ladder
Suppose we have the following table of employees:
Last Name // A1 | First Name | Hire Date | Extension | Department | Office Location // F1 |
---|---|---|---|---|---|
Hawkins | Alvin | 8/23/1994 | 4299 | Accounting | PB4 |
Dandridge | Ray | 8/12/2007 | 4224 | Accounting | PB4 |
Sandifer | Catheryn | 12/23/2006 | 4931 | Accounting | PB4 |
Burke | Reva | 11/3/1995 | 4447 | Accounting | PB4 |
Rundle | Ruben | 6/11/2011 | 4503 | Customer Service | CC1 |
Lipscomb | Phebe | 3/28/1999 | 4124 | Customer Service | CC1 |
Redd | Randal | 7/12/1998 | 4127 | Human Resources | TS1 |
Charlesworth | Rena | 9/1/2007 | 4716 | Human Resources | TS1 |
Burke | Steven | 10/30/2011 | 4005 | IT | TS3 |
Charon | Jacques | 1/14/2003 | 4459 | IT | TS3 |
Leclair | Joseph | 5/1/2013 | 4140 | IT | TS3 |
For the last column,
an employees 'Office Location' is dependent on their 'Department'.
What formula would you write in column F?
Note: It's recommended to use the IFS function or SWITCH Function instead.