View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Dave Peterson Dave Peterson is offline
external usenet poster
 
Posts: 35,218
Default sumif with a second condition

I would think you'd want to look at A962:A1001

=sumproduct(--($a962:$a1001="adr"),--($d962:$d1001="f"),($f962:$f1001))

Adjust the ranges to match--but you can't use whole columns (except in xl2007).

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

=======
And if you're using xl2007, take a look at =sumifs() in excel's help.

jewel wrote:

Help please! I'm a beginner here and I have a working sumif function to
which I need to add a second condition. This second condition is to only sum
if the text in column A is a certain 3-letter code. The closest I've gotten
is a #value error that will work if I limit the text condition to just one
cell. I need the second condition to work over a range of cells. Is this
even the right approach?

=IF(A74="adr",SUMIF($D962:$D1001,"=f",$F962:$F1001 ))

the above formula works; however I need A74="adr" to look at the range
A74:A1001 and apply the sumif to all the adr's that meet the sumif criteria.
Hopefully, this makes sense to someone who can help. TIA!!!


--

Dave Peterson