How to add numbers in adjacent cells

D

DJ

I have a sheet with days of week in one column and values in adjacent cells;
I need to work out the total for each day of the week - see below for example:
Monday 1000
Tuesday 2000
Wednesday 3000
Monday 500
Tuesday 2000
Wednesday 5000

Totals would be 1500, 4000 & 8000 but what is the formula to do this?
 
B

Bob Phillips

=SUMIF(A:A,"Monday",B:B)

--
HTH

Bob

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

Jarek Kujawa

presuming D10=Monday, D11=Tuesday, D12=Wednesday and days in A10:A15,
numbers in B10:B15

one way:

=SUMPRODUCT((D10=$A$10:$A$15)*$B$10:$B$15)

another:

=SUM(IF((D10=$A$10:$A$15)*($B$10:$B$15),$B$10:$B$15,))
this one is an array-formula so CTRL+SHIFT+ENTER it instead of simpy
using enter
 

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