View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Trevor Shuttleworth
 
Posts: n/a
Default COUNT using multiple conditions

Sam

a couple of ways:

=SUMPRODUCT((A2:A29=1)*(B2:B29="a"))

=SUMPRODUCT(--(A2:A29=1),--(B2:B29="a"))

Same effect, slightly different ways of doing it

Note that

=SUMPRODUCT((A2:A29=1),(B2:B29="a"))

does *not* work

Regards

Trevor


"SamGB" wrote in message
...

I need excel to count the number of rows which contain both of two
conditions in seperate cells. the condtions are a specified number AND
a specified letter, if the row only contains one of either conditions i
need excel to ignore it, but if it contains both then count it as one.
I have used the SUMPRODUCT function but it doesnt seem to work, im
guessing because one of the conditions is text not numerical

any ideas?
many thanks


--
SamGB
------------------------------------------------------------------------
SamGB's Profile:
http://www.excelforum.com/member.php...o&userid=31263
View this thread: http://www.excelforum.com/showthread...hreadid=510798