Sum by group
To extract groups from cell range B3:B10 I use the following regular formula in cell B13.
Copy cell B13 and paste to cell B14. Read this article to learn how this formula works.
To sum the numbers by group or value simply use this formula in cell C13.
Copy cell C13 and paste to cell C14.
Explaining formula
The SUMIF function sums cells that meet a condition, the first argument is the range you want to apply the criteria on. In this case cell range $B$3:$B$10, the $ (dollar signs) make the cell reference locked so when the formula is copied the reference stays the same.
The second argument is the criteria found in cell C13. That cell reference has no $ (dollar sign) so it changes when the formula is copied to the cell below. Why? We want it to use another group as a criterion in the next cell.
The third argument $D$3:$D$10 is the actual values we want to sum since they point to the same cell reference no matter where the formula is. It has a $ (dollar sign) that make it an absolute cell reference.
I highly recommend a pivot table if you have lots of data to work with.
Get excel *.xlsx file
Sum category
In this post, I will provide a formula to sum values in column (Qty) where a column (Date) meets two […]
The image above demonstrates a formula that calculates tiered values based on a tier table and returns a total. This […]
Andrew asks: LOVE this example, my issue/need is, I need to add the results. So instead of States and Names, […]
Excel categories
Leave a Reply
How to comment
How to add a formula to your comment
<code>Insert your formula here.</code>
Convert less than and larger than signs
Use html character entities instead of less than and larger than signs.
< becomes < and > becomes >
How to add VBA code to your comment
[vb 1="vbnet" language=","]
Put your VBA code here.
[/vb]
How to add a picture to your comment:
Upload picture to postimage.org or imgur
Paste image link to your comment.