Sumif with criteria help

G

Guest

I am trying to sum total amount spent by account number. Is there a way to
sum a range of cells without having to go in and put the exact number in for
the criteria? For example, I know I can use:

=sumif(a2:a235="101",c2:c235)

But I would like for excel to look at column A and say a2:a6=101 so sum
c2:c6, a7:a8=101 so sum c7:c8, etc. There is not a standard number of items
per account number, and the numbers are in random order (I can sort if I need
to)

Can anybody help?
 
B

Bob Phillips

The range to be checked has to be the same size as the range to be summed,
otherwise it doesn't work.

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 
G

Guest

They are the same size - I just need it to sum if the account number is the
same.
Account # Price
101 $25.00
102 $35.00
102 $65.00
102 $375.00
102 $250.00
103 $85.00
103 $449.00

Basically, what I want to do is sum by account number without having to go
back through and manually sum each set. Is there anyway to do that?
 
P

Peo Sjoblom

=sumif(a2:a235,101,c2:c235)

or better

=sumif(a2:a235,d2,c2:c235)

where d2 holds the account number you want to sum for
 

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