Sum only specific cells based on value in adjacent cell

K

KKD

I want to have a cell that is calculating all costs in a particular category.
The data is laid out in rows, so I will have the following columns:

Date Vendor Category Amount

I want a cell that is adding all amounts that are listed as a particular
category. One category might be "Events", another "Operations", etc. I want
these totals to be separated per category.
 
J

Jacob Skaria

With category in C and Amount in D use SUMIF

=SUMIF(C:C,"Events",D:D)

If this post helps click Yes
 
K

KKD

Can I add an additional criteria to this formula? For instance, can I say sum
if category is Events and date is 1/1/09?
 
K

KKD

Can I add an additional criteria to this formula? For instance, can I say sum
if category is Events and date is 1/1/09?
 
R

RagDyeR

It's best to assign specific cells to contain your variable criteria, so
that you don't have to change the formula itself when the criteria changes.

With say desired date entered in E1, and desired category entered in F1,
try this:

=Sumproduct((A2:A25=E1)*(C2:c25=F1)*D2:D25)

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================



Can I add an additional criteria to this formula? For instance, can I say
sum
if category is Events and date is 1/1/09?
 
R

RagDyeR

It's best to assign specific cells to contain your variable criteria, so
that you don't have to change the formula itself when the criteria changes.

With say desired date entered in E1, and desired category entered in F1,
try this:

=Sumproduct((A2:A25=E1)*(C2:c25=F1)*D2:D25)

--

HTH,

RD
=====================================================
Please keep all correspondence within the Group, so all may benefit!
=====================================================



Can I add an additional criteria to this formula? For instance, can I say
sum
if category is Events and date is 1/1/09?
 

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