View Single Post
  #19   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Sam via OfficeKB.com Sam via OfficeKB.com is offline
external usenet poster
 
Posts: 247
Default SUMPRODUCT - 2 Criteria

Hi Domenic,

Thanks for further input. Answered questions below.

Cheers,
Sam

Domenic wrote:
It looks like SUMPRODUCT returns 0 because your formula...


=IF(ISERR(B5:F5),"",CONCATENATE(COUNTIF($B5:$F5," <=205"),"/",COUNTIF($B5:$F5"205")))


...will always return a text string. If I understand correctly, the intent of the formula is as follows:


1) check B5:F5 for error values, other than #N/A,


Yes

2) if an error value exists, leave the cell blank


Yes

3) if an error value does not exist, divide the number returned by the
first COUNTIF formula by the number returned by the second COUNTIF
formula.


No, not divide. I'm using CONCATENATE with the forward slash "/" as a joiner
/ separator between the first COUNTIF result and the second COUNTIF result.

If this is correct, try...


=IF(OR(ISERR(B5:F5)),"",COUNTIF($B5:$F5,"<=205" )/COUNTIF($B5:$F5,"205"))


...confirmed with CONTROL+SHIFT+ENTER. Does this help?


--
Message posted via http://www.officekb.com