Wednesday, 20 June 2012

How to use the SUMIF Function in Excel

SUMIF is a little bit more complicated than AND, but not much more. This function adds up things depending on the criteria you give it. (Add up the cost of all apples, for example.) The function expects certain arguments. These are:


SUMIF(range, criteria, sum_range)


The first argument, range, is the cell or cells you want to check. For us, this would be the TRUE and FALSE values in the D column. The second argument, criteria, is what you want to check for. In our case this is the value TRUE. The third argument, sum_range, are the cells to add up. The figures we want to add up are all in the E column.


  • So click in an empty cell (E24 is ideal for us)


  • Click inside the formula bar


  • Enter the following SUMIF function:



=SUMIF(C15:C22, TRUE, E15:E22)






  • Press the return key on your keyboard


  • Excel adds up only the value associated with TRUE


If everything went well, then you should have a figure of 11 thousand for your SUMIF function. Your spreadsheet might look like the one below:

The SUMIF function


So our SUMIF function said "Check the cells C15 to C22. If a cell has TRUE in it, make a note of the ammount in the E cell next to it. When you've finished, add them all up."

The SUMIF might be a bit tricky to master, but it can come in quite handy, and it's worth making the effort to understand exactly how it works.

In any case, that concludes are little journey into conditional logic. Hope you're not too disappointed to be leaving the subject behind!

No comments:

Post a Comment