Sum IF

K

K.R

I have a spreadsheet where I track my monthly spending.
Column B is the type for example "Grocery"
And Column D is the dollar amount.
I would like to sum by category. That is, sum my grocery, gas etc all
seperately.
What formula can I use to sum cells in column D only if the corresponding
column B cell is "Grocery"

Please Help!!
 
R

Richard Buttrey

I have a spreadsheet where I track my monthly spending.
Column B is the type for example "Grocery"
And Column D is the dollar amount.
I would like to sum by category. That is, sum my grocery, gas etc all
seperately.
What formula can I use to sum cells in column D only if the corresponding
column B cell is "Grocery"

Please Help!!

=SUMIF(B:B,"Grocery",D:D)

Rgds

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
 
P

Paul B

K.R,
here is one way,

=SUMIF(B1:B15,"Grocery",D1:D15)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
R

Ron Coderre

With
Categories in Col_B
Amounts in Col_D

E1: Grocery
This formula sums all Col_D values where the corresponding Col_B value
matches the value in cell E1
F1: =SUMIF($B:$B,E1,$D:$D)

Alternatively, you could use a pivot table to automatically generate a list
of all Categories and their respective sums

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
K

K.R

Yes it worked. Thanks alot.

Ron Coderre said:
With
Categories in Col_B
Amounts in Col_D

E1: Grocery
This formula sums all Col_D values where the corresponding Col_B value
matches the value in cell E1
F1: =SUMIF($B:$B,E1,$D:$D)

Alternatively, you could use a pivot table to automatically generate a list
of all Categories and their respective sums

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
C

Carlos Antenna

Since you want to see all categories totalled separately, you should have a
look at pivot tables. Your example is a very simple pivot table, but if you
experiment with it on a simple application, you will find other uses for
this powerful tool.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top