sum cells based on criteria in first set of cells

S

summernight

Hope this maks a little since. I'm very new at this and don't use excel alot
but what I'm trying to do is sort items in cells A1- A7 and have it to add
the amounts for that protictuler item which are in anouther group of cells
and get a total amount. maybe this will show what I'm looking for

Date Item Amount
6/12/2007 apples $3.00
6/12/2007 orangers $4.00
6/15/2007 pears $10.00
6/22/2007 apples $3.00
6/25/2007 apples $5.00

Total $25.00

Total
apples ?
orangers ?
pears ?
 
T

T. Valko

Try this:

Assuming you have:

E1 = apples
E2 = oranges
E3 = pears

Enter this formula in F1 and copy down as needed:

=SUMIF(B$1:B$5,E1,C$1:C$5)
 
R

Rick Rothstein \(MVP - VB\)

Hope this maks a little since. I'm very new at this and don't use excel
alot
but what I'm trying to do is sort items in cells A1- A7 and have it to add
the amounts for that protictuler item which are in anouther group of cells
and get a total amount. maybe this will show what I'm looking for

Date Item Amount
6/12/2007 apples $3.00
6/12/2007 orangers $4.00
6/15/2007 pears $10.00
6/22/2007 apples $3.00
6/25/2007 apples $5.00

Total $25.00

Total
apples ?
orangers ?
pears ?

Try this...

For apples: =SUMPRODUCT((B2:B6="apples")*C2:C6)

For pears: =SUMPRODUCT((B2:B6="oranges")*C2:C6)

For pears: =SUMPRODUCT((B2:B6="pears")*C2:C6)

If you want to cover a larger range, make sure the number of cells in both
expressions is the same.

Note: You misspelled "oranges" in your chart.

Rick
 
S

summernight

Thanks Rick I think this will work for what I need.
Sorry I didn't mean to miss spell Orange just got in a hurry while typing.
 

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