If then with 2 criteria, then sum

G

Guest

Using a spreadsheet with the following format:
A B C
1 JEFF MONDAY $5.00
2 LISA MONDAY $10.00
3 LISA MONDAY $5.00
3 JEFF TUESDAY $15.00

I need a formula in column E and F to calculate how much each person sold on
a certain day. If this is true, and this is true, sum this....

D E F
MONDAY TUESDAY
1 JEFF $5.00 $15.00
2 LISA $15.00 $-

THANK YOU!!!
TMF
 
G

Guest

=SUMPRODUCT(--($A$1:$A$4=$D2),--($B$1:$B$4=E$1),$C$1:$C$4)

Place this formula in E2 and copy it across and dow. I used a table like
this (notice it includes the day names in row 1).

A B C D E F
1 JEFF MONDAY $5.00 MONDAY TUESDAY
2 LISA MONDAY $10.00 JEFF $5.00 $15.00
3 LISA MONDAY $5.00 LISA $15.00 $-
3 JEFF TUESDAY $15.00


You could also use something like this if you don't want the header row.

=SUMPRODUCT(--($A$1:$A$4=$D2),--($B$1:$B$4="MONDAY"),$C$1:$C$4)
goes in E1

=SUMPRODUCT(--($A$1:$A$4=$D2),--($B$1:$B$4="TUESDAY"),$C$1:$C$4)
goes in E2

copy down as needed.

Here is the table example.

A B C D E F
1 JEFF MONDAY $5.00 JEFF $5.00 $15.00
2 LISA MONDAY $10.00 LISA $15.00 $0.00
3 LISA MONDAY $5.00
4 JEFF TUESDAY $15.00


PS - One thing to note is B2 contains an uneeded blank space at the end that
might cause you to have an error. "MONDAY" does not equal "MONDAY "
 
G

Guest

=SUMPRODUCT(--($A$1:$A$4 = $D2),--($B$1:$B$4 = E$1),($C$1:$C$4))
copied accross and down.
 

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