PDA

View Full Version : count with sumproduct formula



stunt
09-02-2010, 03:37 PM
Hi,

Could anyone assist me with this please? I am trying to get a count result for D2:D5 but its always giving me a sum result. That is, I want to know the number of scores in D2:D5 range that meets the first 3 criteria ((--(A2:A5=H3),--(B2:B5=K1),--(C2:C5=I3)

Formula I have used is:

=(SUMPRODUCT(--(A2:A5=H3),--(B2:B5=K1),--(C2:C5=I3),D2:D5)).

Please help.

Thanks,
Stunt

pctek
09-02-2010, 05:21 PM
You probably need COUNT rather than sum. See it's Help - its quite comprehhensive and has examples as well:
COUNT
See Also

Counts the number of cells that contain numbers and also numbers within the list of arguments. Use COUNT to get the number of entries in a number field that's in a range or array of numbers.

Syntax

COUNT(value1,value2,...)

Value1, value2, ... are 1 to 30 arguments that can contain or refer to a variety of different types of data, but only numbers are counted.

Remarks

Arguments that are numbers, dates, or text representations of numbers are counted; arguments that are error values or text that cannot be translated into numbers are ignored.
If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells, logical values, text, or error values in the array or reference are ignored. If you need to count logical values, text, or error values, use the COUNTA function.