Forum Discussion
johanvl
Apr 27, 2023Copper Contributor
count a certain combination in a sheet
Hello, I got problems to solve next thing: I have a sheet, 5000 columns, 7 rows. Each cell is filled with a number from 1 to 100 (both included). Each column has 7 unique ordered values (fe 15-33...
HansVogelaar
Apr 27, 2023MVP
Let's say your data are in A1:GJH7 on Sheet1.
And the values you want to count are on Sheet2 in A1 and down.
Enter the following formula in A10 on Sheet1:
=AND(COUNTIF(A1:A7,Sheet2!$A$1:INDEX(Sheet2!$A$1:$A$7,COUNTA(Sheet2!$A$1:$A$7))))
Fill to the right to GJH10.
The formula to count the number of columns that contain the combination is
=COUNTIF(Sheet1!A10:GJH10,TRUE)