View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Can I use COUNTIF for 2 separate IF queries?

You can only use one condition in COUNTIF - use SUMPRODUCT instead,
like this:

=SUMPRODUCT(('RFCs in Progress'!X2:X580--"28/12/2008")*('RFCs in
Progress'!Y2:Y580="success"))

Might be better to put the date in a separate cell, eg D1, and then
refer to that in the formula:

=SUMPRODUCT(('RFCs in Progress'!X2:X580D1)*('RFCs in Progress'!
Y2:Y580="success"))

then you don't need to modify the formula to try it with different
dates.

Hope this helps.

Pete

On Jan 15, 5:56*pm, Kerry wrote:
I'm trying to count the total number of successful changes within a given
timeframe but I either get a 'value' return, or it says I'm adding too many
queries. *I want to count each entry with the text 'success' in one column
within a 7 day range. *So column 'x' will be a date, and column 'y' will
either say 'success' 'withdrawn' or 'refused'. *So far I've tried:

*=IF(AND('RFCs in Progress'!Y2:Y502,"success",'RFCs in
Progress'!X2:X502,"28/12/2008"),"1","0")

but that produces a 'value' result rather than the total number so it must
be wrong. *I've also tried

=AND(countif,'RFCs in Progress'!X2:X58028/12/2008,'RFCs in
Progress'!Y2:Y580,"success")

but that gives me a 'name' result so must also be wrong. *Is it because I'm
comparing too many things or because I'm trying to use dates? *Any help
greatly appreciated I've been trying to do this for ages!