Forum Discussion

Gyula Nagy's avatar
Gyula Nagy
Copper Contributor
Jun 11, 2018
Solved

Count the number of cells which have values from another range

Hi all, I have a huge amount of cells contain numbers in E3:CY2 I have a range of numbers in A2:A1230 I would like to count the number of cells from E3:CY2 where the cell value is present in A2:...
  • SergeiBaklan's avatar
    SergeiBaklan
    Jun 11, 2018

    Hi Gyula,

     

    These two formulas give exactly the same result, the only the one with SUM you shall use as array formula, that means entering it you press not Enter but keep pressed Ctrl and Shift, after that Enter and release all 3 buttons.

     

    SUPRODUCT in this case just allow to avoid array formula, it multiplies on nothing.  If we take that small sample

    if we evaluate SUMPRODUCT, result after COUNTIF will be

    =SUMPRODUCT({0;2;1;0})

    and after that the formula sums the array. The same as do one by one at the left side.

    Please see the sample attached.

Resources