Forum Discussion
How can I count cells with numbers?
Hi Sergei,
I am wondering how can I modify the below equation:
=SUMPRODUCT(--($A$1:$E$325=OFFSET($A$1:$E$325,1,0))*(($A$1:$E$325=I3)))
To make it count numbers that have been recycled in the previous row (current formula above only counts the below number but fails to count a recycled number that is not under it). I've managed to complete a conditional format that will highlight them in red but I cannot figure out on how to count the actual number of times the number was recycled given a data set. Please see the attached file.
Hi John,
To clarify - you count the numbers which are in next row in the same and next columns (34, 24 on screenshot), but not in previous columns (28), correct?
- John nullNov 27, 2018Copper Contributor
Hi Sergie,
I want to count any numbers that are in a given row (e.g., 28,39,20,34,14) that recycle into the next above row (e.g., 7,17,28,34,8) and to be able to plot the frequency of occurrence:
Numbers: Freq:
28 1
34 1
7 0
17 0
- SergeiBaklanNov 27, 2018Diamond Contributor
Hi John,
I changed conditional formatting rule formula on
=COUNTIF(OFFSET(A2,-1,1-COLUMN(A2),,5),A2)
which applied starting from row #2, and the formula to calculate frequency
=SUMPRODUCT(--(MMULT(--($A$2:$E$325=$I3)+--(OFFSET($A$2:$E$325,-1,0)=$I3),{1;1;1;1;1})>1))