Forum Discussion
Rodgie22
Jan 22, 2025Copper Contributor
COUNT UNIQUE VALUES WHILE FILTERING
Hi, I need some help regarding my file. I have managed to count total unique values in column L which is 4,075, however if I apply filter on the dates that are not blank, it still showing t...
BackslashLambda
Jan 24, 2025Copper Contributor
SUBTOTAL(3, range) will count non-empty cells in a range but only include visible rows. Subtotal is the only function that takes autofilter into account.
Add the bold part to your existing formula and it will do what you want.
=SUM(IF(FREQUENCY(IF(LEN(L10:L12194)*BYROW(L10:L12194,LAMBDA(x,SUBTOTAL(3,x)))>0,MATCH(L10:L12194,L10:L12194,0),""),IF(LEN(L10:L12194)>0,MATCH(L10:L12194,L10:L12194,0),""))>0,1))