How do you add related cells in a sum?

J

Jarod

I am trying to add certain groups within a spreadsheet. For example:

A group will have a type and an amount. If the type is "Check" then I want
it to add the amount in the sum "Total Checks." If the type is anything
else, then I want it to add the amount in the sum "Total Everything."

How do I tell it to add all of the related amount cells for "Checks," but
not ALL of the cells with amounts? I have a temp setup right now with IF
statements, but I'm limited to 30 cells due to the formula length. I feel
like this should be REALLY easy.
 
P

Pete_UK

You can use SUMIF, along the lines of:

=SUMIF(T1:T100,"Check",A1:A100)

where I have assumed that your Type is in column T and the Amount is
in column A, and that you have 100 rows of data - adjust to suit your
situation.

Hope this helps.

Pete
 
B

BoniM

With Sumif..
Checks - =SUMIF(D2:D101,"check",E2:E101)
Everything but checks - =SUMIF(D2:D101,"<>Check",E2:E101)

Or with Sumproduct...
Checks - =SUMPRODUCT((D2:D101="check")*(E2:E101))
Everything but checks - =SUMPRODUCT((D2:D101<>"check")*(E2:E101))

Both with Type in column D and amount in Column E - adjust ranges as
necessary.
 

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