December 06, 2018
Excel has many uses, one of which is adding two or more numbers together. It is a very easy task to perform and there are a couple of different ways that you can do it. Depending on what Excel is trying to add for you, some ways are better suited then others.
Just like in maths, the plus ”+” sign is used to denote the addition between two numbers. i.e.
1 + 1
You can also use the plus sign to add multiple numbers together. i.e.
1 + 2 + 3 + 4
This is the same for Excel. To do this:
You should have this:
= 1 + 2
Easy. You can also do this with cell references, for example:
= A1 + B1
or a mixture of the two
= A1 + B1 + 100 + C1 + 5
Another way that you can add things together in Excel is to use the SUM function. Sum being the total amount resulting from adding one or more numbers together. We can demonstrate using the above examples.
= SUM( 1, 1 ) // 1 + 1
= SUM( 1, 2, 3, 4 ) // 1 + 2 + 3 + 4
And just like the plus sign, you can also use this function to add a mixture of cell references and numbers.
= SUM( A1, B1 ) // A1 + B1
= SUM( A1, B1, 100, C1, 5 ) // A1 + B1 + 100 + C1 + 5
Unlike using the plus sign, you can also add a range of cells together but putting it into the SUM function. This also works with named ranges.
= SUM ( A1, B1:B100, 100 ) // A1 + SUM( B1:B100 ) + 100
= SUM ( costs, A1, tax ) // costs (named range) + A1 + tax (named range)
Visit this article for more information and how to use the SUM function
Sometimes you don’t actually want to add every value in a range. You may want to disregard some of these values in accordance to specific business rules and test. To do this, we can use the SUMIF function. To test against more than one condition, we can use the SUMIFS function.
For example, you have a list of items with an associated cost. What you want to do is add up the total cost of all the items that we have already bought.
Item | Bought | Price |
---|---|---|
Nails | Yes | $5.00 |
Screws | Yes | $5.00 |
Wood Beam | No | $10.00 |
Wood Sheet | No | $15.00 |
Steel Beam | Yes | $25.00 |
Steel Sheet | No | $50.00 |
Wood Glue | No | $25.00 |
Epoxy Glue | Yes | $7.50 |
= SUMIF( C3:C10, "Yes", D3:D10 )
You can also extend this example to include an extra condition by using the SUMIFS function. Be aware that the parameters in the SUMIF and SUMIFS functions are slightly different to one another.
For example, you also want to only add the bought items that are greater than or equal to $10.
= SUMIFS( D3:D10, C3:C10, "Yes", D3:D10, ">=10" )