Skip to main content

The Excel SumIF Function

 - Another useful Excel function is SumIF. This function is like CountIf, except it adds one more argument:
SUMIF(rangecriteriasum_range)
Range and criteria are the same as with CountIF - the range of cells to search, and what you want Excel to look for. The Sum_Range is like range, but it searches a new range of cells. To clarify all that, here's what we'll use SumIF for. (Start a new spreadsheet for this.)
Five people have ordered goods from us. Some have paid us, but some haven't. The five people are Elisa, Kelly, Steven, Euan, and Holly. We'll use SumIF to calculate how much in total has been paid to us, and how much is still owed.
So in Column A, enter the names:
Create the following Excel 2007 Spreadsheet
In Column B enter how much each person owes:
In Column C, enter TRUE or FALSE values. TRUE means they have paid up, and FALSE means they haven't:
Add two more labels: Total Paid, and Still Owed. Your spreadsheet should look something like this one:
In cells B10 and B11, we'll use a SumIF function to work out how much has been paid in, and how much is still owed. Here's the SumIF function again:
SUMIF(rangecriteriasum_range)
So the range of cells that we want to check are the True and False values in the C column; the criteria is whether they have paid (True); and the Sum_Range is what we want to add up (in the B column).
In cell B10, then, enter the following formula:
=SUMIF(C3:C7TRUEB3:B7)
When you press the enter key, Excel should give you the answer:
So 265 is has been paid in. But we told SumIF to first check the values in the cells C3 to C7 (range). Then we said look for a value of TRUE (criteria). Finally, we wanted the values in the B column adding up, if a criteria of TRUE was indeed found (sum_range).
Exercise
Use SumIF to work out how much is still owed. Put your answer in cell B11.

We'll leave the subject of Conditional Logic. In the next section, more things you can do with Excel!

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...