Link to home
Start Free TrialLog in
Avatar of WAS_Infra
WAS_InfraFlag for Afghanistan

asked on

How to "group count" in Excel?

Dear Excel experts,
Here is the background:
I have a script that pulls all the “alarms” from all the “servers” from the environment.
The script output is csv file that holds the following columns and data:
•      Time of the alarm.
•      Component
•      Alarm type
•      Server ID
•      And other data that not relevant to the question.

Some information about the relation of the items:
•      For each component there are several “alarm type”  and each “alarm type” belong  to one specific component.

•      Each alarm can have more than one instance (==line) on a server (ID).


Each component has

I would like to pull from this CSV file the following:
•      Number of unique alarm currently in the system (basically to do some kind of “grouping” based on Alarm type.

•      Number of unique alarm for each component (grouping based  on ”component” and “alarm type”)

Or in other words, how do you I do “group  count” in excel?

Thanks in advance,
Avatar of Ryan
Ryan
Flag of United States of America image

You can "Remove duplicates" based only on Alarm type, then do the same with Type and Component.

You can also sort by these 2 columns, then do a grouping, with a count function to get a similar result, but I think this will be harder to read for you.
Here's an implementation of Cpearson's Distinct Values UDF and also native countifs function in Excel. Please see the attached files for sample implementation and let us know if it's what you need.
countdistinct.xlsm
ASKER CERTIFIED SOLUTION
Avatar of Patrick Matthews
Patrick Matthews
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Suggest you may want to use the frequency function.  See the following link http://office.microsoft.com/en-us/excel-help/count-occurrences-of-values-or-unique-values-in-a-data-range-HP003056118.aspx

I have also used sumproduct for this at times.

Regards,