Skip to main content

The Excel CountIF Function

 - Another useful function that uses Conditional Logic is CountIF. This one is fairly straightforward. As its name suggests, it counts things! But it counts things IF a condition is met. For example, keep a count of how many students have an A Grade.
To get you started with this function, we'll use our Student Grade spreadsheet and count how many students have a score of 70 or above. First, add the following label to your spreadsheet:
A new label has been added to the K column
As you can see, we've put our new label at the start of the K column.
We can now use the CountIF function to see how many of the students scored 70 or above for a given subject.
The CountIF function looks like this:
COUNTIF(range, criteria)
The function takes two arguments (the words in the round brackets). The first argument is range, and this means the range of cells you want Excel to count. Criteria means, "What do you want Excel to look for when it's counting?".
So click inside cell K2, and then click inside the formula bar at the top. Enter the following formula:
=CountIf(B2:I2, ">= 70")
The cells B2 to I2 contain the Math scores for all 8 students. It's these scores we want to count.
Press the enter key on your keyboard. Excel should give you an answer of 4:
A CountIF Function in Excel 2007
(If you're wondering where the columns B to I have gone in the image above, we've hidden then for convenience sake!)
To do the rest of the scores, you can use AutoFill. You should then have a K column that looks like this:
By using CountIF, we can see at a glance which subjects students are doing well in, and which subjects they are struggling in.
Exercise
Add a new label to the L column. In the cells L2 to L9, work out how many students got below 50 for a given subject. You should get the same results as in the image below:

In the next part, we'll look at a function similar to CountIF - SumIF.

Comments

Popular posts from this blog

PRATYUSHA HOME

Hi interesting readers, Prathysha NGO, Chennai. Bala gurukul orphange, chennai. Pratyusha support, Hyderbad. Krr oldage home, Vizag. Disa foundation.......................................................... so on..................... Join hands with us for a good cause. Thank you all. Contact  us on our  whatsapp no:  8939374254    for the more details. You can pay through Paytm scanner. for each donor we will give an online PDF book as a gift. Thank you Pratyusha Home
Javascript Tutorials for the Beginner - Welcome to the Home and Learn course for Javascript. Although it is aimed at complete beginners to the subject we do assume that you have some knowledge of HTML and a little CSS. You don't have to be an expert, though. Just the basics will do. (If you're not sure about the HTML then see our Web Design course.) You don't need to buy any software for this Javascript course - you probably already have everything you need to get started.   > Section One: Getting Started 1. Software needed 2. Our Javascript Templates 3. A little word about debugging Home Page > Section Two: The Browser 1. A First Script 2. Javascript Tag Placement 3. The Browser Object Model 4. Browser Window Methods 5. The Document Object Model > Section Three: Javascript Programming Basics 1. Javascript Variables 2. Math Operators 3. Operator Precedence 4. IF Statements 5. IF ... Else 6. Comparison Operators 7...
How to Enter Text and Numbers in a Cell  - To make a start, we'll create this really simple spreadsheet: All we're going to be doing here is entering some text and some numbers. We're not adding anything up yet. Before you tackle this first exercise, though, you may want to take note of the  Undo  feature, just in case you make a mistake. The Undo option is the left curved arrow, right in the top-left of your screen. This one for Excel 2007 users: And this one for Excel 2010 and Excel 2013 users: For later version, thie icon is this: Click the left curved arrow to Undo something, and click the right curved arrow to redo it. The Undo arrow also has a dropdown box. Click the small arrow next to Undo to see the following: This list is for multiple Undo's. Move your mouse down the list and click to undo several steps at once. But back to the spreadsheet. Click inside of cell A1 on your spreadsheet, and do the following: Type the word "Nu...