Counting Distinct Values

ShaneL79

New Member
Joined
Dec 1, 2022
Messages
1
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
Hello,

I am stuck on an issue where I count distinct values. Hopefully my explanation is clear enough.

Example Data:

EVENT #SYSTEM EVENT TYPEEVENT SEVERITYEVENT RANGE
100AFAILS8USED
100AFAILS8USED
101AFAILS8USED
102AFAILS8USED
103AFAILS8USED
103BFAILS8USED
103BFAILS8USED
103BFAILS8USED

For the sake of this data, I showed EVENT TYPE, EVENT SEVERITY, and EVENT RANGE as a single value. These do have multiple values, but I know how to filter by value. It is counting the distinct EVENT # for the following criteria:

COUNT
  • [DISTINCT EVENT #]
WHERE
  • SYSTEM = A
  • EVENT TYPE = FAIL
  • EVENT SEVERITY = S8
  • EVENT RANGE = USED
Based on the above date, the value would be "4". Assuming I am using the word "distinct" correctly, I want any groupings with similar EVENT # to count as 1. Using the above data, this means the 4 items are 100, 101, 102, and 103.

Any idea?

Thank you.
 

Excel Facts

How to show all formulas in Excel?
Press Ctrl+` to show all formulas. Press it again to toggle back to numbers. The grave accent is often under the tilde on US keyboards.
Welcome to the MrExcel board!

Try this

22 12 02.xlsm
ABCDEFGH
1EVENT #SYSTEMEVENT TYPEEVENT SEVERITYEVENT RANGESYSTEMA
2100AFAILS8USEDEVENT TYPEFAIL
3100AFAILS8USEDEVENT SEVERITYS8
4101AFAILS8USEDEVENT RANGEUSED
5102AFAILS8USEDCOUNT DISTINCT4
6103AFAILS8USED
7103BFAILS8USED
8103BFAILS8USED
9103BFAILS8USED
Count Unique
Cell Formulas
RangeFormula
H5H5=COUNT(UNIQUE(FILTER(A2:A9,((B2:B9=H1)*(C2:C9=H2)*(D2:D9=H3)*(E2:E9=H4)))))
 
Upvote 0
Solution

Forum statistics

Threads
1,223,903
Messages
6,175,287
Members
452,631
Latest member
a_potato

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