Forum Discussion
Karolien_Abts
Jul 04, 2024Copper Contributor
Count distinct values based on 2 criteria in other columns
Hi all, First post here, tried to find my answers, but didn't get a complete solution for my issue, so hope you can help. I have to count no of distinct trial numbers in a range in column A ...
- Jul 04, 2024
Based on initial formula that could be
=SUM( ($Z3:$Z15<>"")* ISNUMBER( SEARCH("leaf",$D3:$D15)) * IFERROR( 1 /COUNTIFS($A3:$A15,$A3:$A15, $Z3:$Z15,"<>",$D3:$D15,"LEAF*"),1))
Karolien_Abts
Jul 04, 2024Copper Contributor
That gives me the error #spill!
SergeiBaklan
Jul 04, 2024Diamond Contributor
Based on initial formula that could be
=SUM( ($Z3:$Z15<>"")* ISNUMBER( SEARCH("leaf",$D3:$D15)) * IFERROR( 1 /COUNTIFS($A3:$A15,$A3:$A15, $Z3:$Z15,"<>",$D3:$D15,"LEAF*"),1))
- Karolien_AbtsJul 04, 2024Copper ContributorThank you Sergei, this indeed works as well, seems many ways lead to the same solution!
- SergeiBaklanJul 04, 2024Diamond Contributor
Yes, practically everything in Excel could be done by several ways. It's infinite.