help needed with "if" statement

  • Thread starter Thread starter gina_b
  • Start date Start date
G

gina_b

Hello there,

Based on the attached table, I'm trying to show a total for:

if column b is "outside services" AND column c is "1", then take the
total from column a.
(In other words, I'd like the function to know to add cells a2, a3 and
a5 to produce 212459).

I'm getting my "if" statements messed up somewhere and am wondering if
anyone could help me?

Thank you very much,
Gina


+-------------------------------------------------------------------+
|Filename: questions.doc |
|Download: http://www.excelforum.com/attachment.php?postid=4163 |
+-------------------------------------------------------------------+
 
Hi!

Try something like this:

=SUMPRODUCT(--(B1:B10="outside services"),--(C1:C10=1),A1:A10)

Better to use cells to hold the criteria:

D1 = outside services
E1 = 1

=SUMPRODUCT(--(B1:B10=D1),--(C1:C10=E1),A1:A10)

Adjust the ranges to suit. (just can't use entire columns like A:A)

Biff
 
Biff,
Thanks so much.
I'll give it a try and see what happens.
I REALLY appreciate it!
Thanks and Happy New Year,
Gina
 
Back
Top