Professional Documents
Culture Documents
1. Average Function – Open the “Average” worksheet of the Exer 2.xlsx file
2. Count Function
Count 1 Worksheet: Here we have our heroes, working hard to save people (and to earn money to pay the bills). You need to
figure out how many days did each hero work, and how many heroes worked each day. So you need to use the COUNT function
in horizontal and vertical way.
With this formula we found that Thor and Rocky were the most active heroes during the week, they worked 6 days! While Obi
Wan Kenobi simply didn’t want to work that much. At the same time , we found that Friday was the least active day of the
week. I guess some heroes need a break.
RESULT: I was able to get the result of 7 of heroes who worked on Monday with the use of the COUNT
function by formulating “=COUNT()” from cell B2 to G2. By entering the COUNT function, the result is
shown in cell B11 and applying to the other cells by simply dragging down, on the other side, I was able to
get the result of the working days of Goku which is 4, which can be found in cell H2 then applying the same
action by dragging downwards.
3. Count Function
Count 2 Worksheet: Ever had a column of data and wanted to check if all of the values contain valid numbers? It
would be cumbersome to count and check them one by one, especially if you had hundreds of entries! Imagine we
have the following data, we see an error, a text and a couple of numbers:
Thankfully there is an easy way to count how many of these cells contain valid numbers using the Excel’s COUNT
formula.
STEP 1: We need to enter the COUNT function in a blank cell:
=COUNT(
RESULT: I was able to get the result of 2 with the use of the COUNT function by
formulating “=COUNT()” from cell C9 to C12. By clicking the COUNT function, the result
is shown in cell D9.
4. Counta Function
Counta Worksheet: Do you have a scenario where you want to count the number of cells that are non-blank or not
empty? There is a simple way to count this with Excel’s COUNTA formula! This formula counts everything:
numbers, text, non-empty text ””.
STEP 1: We need to enter the COUNTA function in a blank cell. Notice there are 6 non-blank cells in here:
=COUNTA(
STEP 2: The COUNTA arguments:
value
What is the value or range of values that you want to check how many are non-blank?
=COUNTA(B9:C12)
You now have your count of values that are non-blank! There are 6 non-blank values!
RESULT: I was able to get the result of 6 with the use of the COUNTA function by
formulating “=COUNTA()” highlighting the cell of B9 to C12. By clicking the COUNTA
function, the result is shown in cell D9.
5. Countblank Function
Countblank Worksheet: Do you have a scenario where you want to count the number of cells that are blank in your
Excel data?
If you are auditing your data and want to make sure that a blank cell is actually blank (and doesn’t contain an invisible
character), then this formula is for you.
STEP 1: We need to enter the COUNTBLANK function in a blank cell:
=COUNTBLANK(
STEP 2: The COUNTBLANK arguments:
range
What are the range of values that you want to check to see how many are blank? =COUNTBLANK(B9:C12)
You now have your count of values that are blank! There are 3 blank values!
RESUL
T: I was able to get the result of 3 with the use of the COUNTBLANK function by
formulating “=COUNTBLANK()” from cell B9 to C12. By entering the COUNTBLANK
function, the result is shown in cell D9.
6. CountIF Function
CountIF Worksheet: Do you have a scenario where you want to count the number of cells that match a specific
condition? There is a simple way to count this with Excel’s COUNTIF formula!
The COUNTIF formula is very flexible indeed, so let us try to count the following from our Excel worksheet:
Number of cells greater than 2
Number of cells that have a Yellow value
Number of cells that start with the letter “J”
STEP 1: We need to enter the COUNTIF function in a blank cell:
=COUNTIF(
criteria
What is the condition that you want to check against?
For our 1st example, we want to count the number of values greater than 2.
=COUNTIF(A9:A12, “>2”)
You now have your count of values that have the Yellow text!
RESULT2: I was able to get the result of 2 with the use of the COUNTIF function by
formulating “=COUNTIF()” from cell C9 to C12, emphasizing the numbers that has a
yellow values. By entering the COUNTIF function, the result is shown in cell D9.
STEP 4: Now let us try for counting the number of names starting
with the Letter J:
Let us use the wildcard expression J*
* signifies a wildcard character i.e. Return any value that begins with a J
=COUNTIF(E9:E12, “J*”)
You now have your count of values that have a starting letter of J!
RESULT3: I was able to get the result of 3 with the use of the COUNTIF function by
formulating “=COUNTIF()” from cell E9 to E12, emphasizing the numbers of names that
starts with letter J. By entering the COUNTIF function, the result is shown in cell F9.
7. CountIFS Function
CountIFS Worksheet: Do you have a scenario where you want to count the number of cells that match specific
conditions? There is a simple way to count this with
Excel’s COUNTIFS formula! This is very similar to the CountIf Formula! The only difference is it allows you to
add even more conditions as needed…That’s
POWEFUL!
The COUNTIFS formula is very flexible indeed, so let us try to count the following from our Excel worksheet:
Number of times John got more than 10,000 sales
Number of times Kim got more than 18,000 sales
STEP 1: Let us target the first question: How many times John got
more than 10,000 sales?
We need to enter the COUNTIFS function in a blank cell:
=COUNTIFS(
STEP 2: The COUNTIFS arguments:
range1, criteria1
What is our first condition?
We want to find the names that match “John”
=COUNTIFS(A9:A13, “John”,
range2, criteria2
What is our second condition?
We want to find sales that are more than 10,000
=COUNTIFS(A9:A13, “John”, C9:C13, “>10000”)
range2, criteria2
What is our second condition?
We want to find the sales that are more than 18,000
=COUNTIFS(A9:A13, “Kim”, C9:C13, “>18000”)
You now have your count of 1!
RESULT2: I was able to get the result of 1 with the use of the COUNTIFS function by
formulating “=COUNTIFS()” from cell A9 to A13, emphasizing “Kim”, highlighting the cell
of C9 to C13, and entering the value that were finding out “>18000” . By entering the
COUNTIFS formula, the result is shown in cell E9.
8. Conditional Function – SumIF, AverageIF, CountIF
Scenario:
You’ve been given a spreadsheet that contains the Apple sales by quarter for
three regions. You’ve been asked to summarize the data and provide the
following information:
1) What are the total sales by quarter? SUMIF
2) What are the average sales by quarter? AVERAGEIF
3) How many times per quarter were sales greater than $400? COUNTIFS
4) Total number of times for all quarters, sales were greater than $400? COUNTIF
RESULT1: I was able to get the result of 884 with the use of the SUMIF function by
formulating “=SUMIF(B:B,1,C:C)”. By clicking the SUMIF function, the result is shown in
cell F2, then applying the same action to the remaining cells by dragging downwards and
changing the criteria value according to the appropriate quarter.
AVERAGEIF: What are the average sales by quarter?
1. Place your cursor in cell ‘G2’
2. From the Ribbon select the tab ‘Formulas’
3. Click fx Insert Function
4. When prompted, type ‘AverageIF’ in the ‘Search for a function:’
box
5. Click the ‘Go’ button
6. Click the ‘OK’ button:
In the Function Arguments dialogue box enter the following:
A. For the Range click the column ‘B’ (this column lists the
quarter)
B. For the Criteria enter ‘1’ for Quarter 1 (note: if this were a text
field, you would encapsulate the text with double quotes “ ”)
C. For the Average_range click the column ‘C’ (this column list
the Apple sales)
7. Click the ‘OK’ button
8. Copy the formula down through cells ‘G3’ – ‘G5’ and change the
‘Criteria’ value for the appropriate quarter (i.e. 2,3, & 4 for
quarters 2-4)
RESULT2: I was able to get the result of 295 with the use of the AVERAGEIF function by
formulating “=AVERAGEIF(B:B,1,C:C)”. By clicking the AVERAGEIF function, the result
is shown in cell G2, then applying the same action to the remaining cells by dragging
downwards and changing the criteria value according to the appropriate quarter.
COUNTIFS: How many times per quarter were sales greater than $400?
In this example, we need to determine two items: A) the quarter AND B) the
number of times sales were greater than $400
1. Place your cursor in cell ‘H2’
2. From the Ribbon select the tab ‘Formulas’
3. Click fx Insert Function
4. When prompted, type ‘CountIFS’ in the ‘Search for a function:’
box
5. Click the ‘Go’ button
6. Click the ‘OK’ button:
In the Function Arguments dialogue box enter the following:
For the Criteria_range1 click column ‘B’
For the Criteria1 enter ‘1’ for Quarter 1
For the Criteria_range2 click column ‘C’
For the Criteria2 enter “>400” for sales greater than $400,
(make sure >400 is in double quotes “ ”)
7. Click the ‘OK’ button
8. Copy the formula down through cells ‘H3’ – ‘H5’ and change the
‘Criteria1’ value for the appropriate quarter (i.e. 2,3, & 4 for
quarters 2-4)
RESULT3: I was able to get the result of - with the use of the COUNTIFS function by
formulating “=COUNTIFS(B:B,1,C:C,”>400”)”. By clicking the COUNTIFS function, the
result is shown in cell H2, then applying the same action to the remaining cells by dragging
downwards and changing the criteria value according to the appropriate quarter.
COUNTIF
The total number of times over all quarters, sales were greater than $400?
1. Place your cursor in cell ‘J2’
2. From the Ribbon select the tab ‘Formulas’
3. Click fx Insert Function
4. When prompted, type ‘CountIF’ in the ‘Search for a function:’
box
5. Click the ‘Go’ button
6. Select ‘CountIF’ and click the ‘OK’ button:
In the Function Arguments dialogue box enter the following:
A. For the Range click the column ‘C’
B. For the Criteria enter “>400” for sales greater than $400, (make
sure >400 is in double quotes “ ”)
7. Click the ‘OK’ button
The result is; 5 times over all quarters, sales were greater than $400
RESULT4: I was able to get the result of 5 with the use of the COUNTIF function by
formulating “=COUNTIF(C:C,”>400”)”. By clicking the COUNTIF function, the result is
shown in cell J2, then applying the same action to the remaining cells by dragging
downwards and changing the criteria value according to the appropriate quarter.