Count distinct if lot of condition

palo173

New Member
Joined
Sep 11, 2023
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi, please could you help me? It is difficult to explain, but I will try.

I want to count distinct of Tests in my Excel table.
For example for Test_1 I want to count all Tests, but only that kind of tests which have at least 1 Cond, which is in the same Cond as Test1. Result is 8 because condition is valid for Test_1, Test_2, Test_3, Test_4, Test_5, Test_6, Test_7, Test_10. I used Colours in table only for better idea of calculation for Test_1.

For Test_2 it is 7 (Test1, Test2, Test3, Test4, Test5, Test6, Test10).
For Test_10 it is only 5 (Test_1, Test_2, Test_3, Test_4, Test_10).

Column B is result, which I counted manually. I need some kind of formula in excel, because I have Lot of tests and Conds in table.

If it is not clear, I can add it.
Thank you

1694427223568.png
 

Excel Facts

Square and cube roots
The =SQRT(25) is a square root. For a cube root, use =125^(1/3). For a fourth root, use =625^(1/4).
Hi & welcome to MrExcel.
How about
Excel Formula:
=SUM(SIGN(MMULT(--$D$2:$M$11,TOCOL(--D2:M2))))
 
Upvote 0
Solution
You're welcome & thanks for the feedback.
 
Upvote 0
You're welcome & thanks for the feedback.
@Fluff , could I ask you for your aditional help with upgrade Excel formula? I try to counts only "aliquot counts".

So for first row (Test_1) it was formula =SUM(SIGN(MMULT(--$D$2:$M$11,TOCOL(--D2:M2)))) and result 1+1+1+1+1+1+1+0+0+1 = 8
But when I want to counts only aliquot part, result will be 1+0,8+0,6+0,6+0,8+0,6+0,2+0+0+0,2 = 4,8 (each number 1 from previous formula divided by 5, because Test_1 has 5 Conds).

I believe, it will helpful to somebody.
Thank you for your help

1695713683780.png
 
Upvote 0

Forum statistics

Threads
1,224,812
Messages
6,181,088
Members
453,021
Latest member
Justyna P

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top