View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Biff
 
Posts: n/a
Default help needed with "if" statement

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

"gina_b" wrote in
message ...

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 |
+-------------------------------------------------------------------+

--
gina_b
------------------------------------------------------------------------
gina_b's Profile:
http://www.excelforum.com/member.php...o&userid=29996
View this thread: http://www.excelforum.com/showthread...hreadid=496867