Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello All,
I am trying to make a monthly expense sheet to help keep track of spending and where it is going. I have 2 sections on my sheet, the top where the all expenses go and the bottom where I would like the totals of some categories to be put. In column B there is a drop down menu that has a list of categories. In Column D is the expense. What I would like is a function that can add the expense value if the category equals something. How would I go about setting something like this up? Thanks for the help. I can send a spreadsheet to anyone that needs it.

I'm not quite clear about your use of the drop down.
Do you have a drop down in every row so you can choose a category for each row?
It sounds like SUMIF might work. For example, if your categories were in Column B and your values in Column D, then you could use:
=SUMIF(B1:B10,"=Car",D1:D10)
This would sum all the values in Coulmn D where Coulmn B of the same row contained Car.
If you have the categories names in cells, you could do something like this:
e.g. if Car was in A44...
=SUMIF(B1:B10,$A$44,D1:D10)
Let me know if that helps.

The SUMIF was exactly what I was looking for. I plugged it in and was able to get it working. Final entry was:
=SUMIF(B4:B25,$A$29, D4:D25). Pulled the A29 from an entry in the list I created for the categories. Thanks again for the help.

Hi,
If you change your formula slightly it will make it easier to extend it by dragging rather than re-entering ranges.
=Sumif($B$4:$B$25,$A29, $D$4:$D$25)
Now if you drag the formula it will always refer to the criteria range B4 to B25 and the sum range D4 to D25.
and if you have a list of criteria starting at A29, dragging the formula down one row will pick up the category from A30.
Regards

![]() |
![]() |
![]() |
| Login or Register to Reply | |
| Login | Register |
| Ads by Google |