# Adding Cells based on a category in Excel

Hi,

I have a basic excel question.  I've got a spreadsheet with two columns. One is dollar amounts and the other is category. I have 4 categories that I'm putting the dollar amounts into. For example,

Office Supplies
Meals
Telephone

I am trying to figure out how to automatically total the dollar values for each category.  It should be something straight forward like total all dollar values in column A that have "meals" listed in column B for the same row.

The purpose here is that I have months of credit card statements that I need to go through to and break down in categories. I can get them in Excel but the charges are all mixed together and are currently not groups in any category.   If I can add a category column to that spreadsheet and then have it total them it would be a tremendous time saver as there will probably be about 25 categories for each statement and a few hundred charges for each month.  I've attached a basic sample sheet showing what I'm would like to do.

Thanks

SampleSheet.xls
LVL 1
###### Who is Participating?

x

Commented:
Just use a SUMPRODUCT formula like this:

=SUMPRODUCT((\$B\$2:\$B\$12=E3)*(\$A\$2:\$A\$12))

jppinto
SampleSheet.xls
0

Commented:
...or SUMIF....

In F3 copied down

=SUMIF(B:B,E3,A:A)

regards, barry
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.