Calculate totals

M

Mike Mike

This is what I got:
bananas 5 9 3 1
bananas 1 2 7 3
bananas 8 7 4 2
oranges 1 5 1 3
oranges 2 4 8 2
pears 9 5 2 3
pears 7 5 2 3 etc......

I need one row with the totals for each "fruit"

bananas 14 18 14 6
oranges 3 9 9 5
pears 16 10 4 6 etc...

Anyone know how to do this?
 
P

Paul B

Mike, use something like this,

=SUMIF(A1:A10,"bananas",B1:B10)

--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 
D

Dallman Ross

Mike Mike said:
This is what I got:
bananas 5 9 3 1
bananas 1 2 7 3
bananas 8 7 4 2
oranges 1 5 1 3
oranges 2 4 8 2
pears 9 5 2 3
pears 7 5 2 3 etc......

I need one row with the totals for each "fruit"

bananas 14 18 14 6
oranges 3 9 9 5
pears 16 10 4 6 etc...

Assuming you're starting in Col A with the names
and data begins on the first row, then -- in
B14, where you have the first "bananas" total,
use this:

=SUMIF($A1:$A7,OFFSET($A$1,ROW()-1,0),B1:B7)

Drag that down and across. This also assumes you
are repeating the names in Col. A on your totals
rows, as you have done in the example.

-dman-
 
B

Bernard Liengme

Read Help to fins out about SUMIF then come back with any questions
OR learn about pivot tables (a bit more complicated)
best wishes
 
D

Dallman Ross

Dallman Ross <dman@localhost.> said:
Assuming you're starting in Col A with the names
and data begins on the first row, then -- in
B14, where you have the first "bananas" total,
use this:

I didn't mean "B14", but rather in the first totals
row (for "bananas") in Col B. When I set up my
test sheet, I had it in B14, but it doesn't matter
which row the totals start on:
=SUMIF($A1:$A7,OFFSET($A$1,ROW()-1,0),B1:B7)

Drag that down and across. This also assumes you
are repeating the names in Col. A on your totals
rows, as you have done in the example.

-dman-
 

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