Pivot Table Issues

How to Count Unique Attendees by Month and Activity in Excel

Adam DavisAdam Davis Nov 11, 2026 869 views

Question details

The user needs to calculate the number of unique participants and their attendance frequency categorized by month, activity, and email address using Excel formulas.

How to Count Unique Attendees by Month, Activity, and Email in Excel
Product
Microsoft Excel
Device & OS
not provided
Scenario
Tracking event attendance and calculating distinct participant metrics across multiple categories (month, event, email).
Observed behavior
Needs a streamlined way to extract unique combinations and summarize attendance data, typically requiring modern dynamic array functions or advanced pivot tables.
Before you start

Ensure you are using a compatible version of Microsoft 365, as modern dynamic array functions like UNIQUE, HSTACK, and PIVOTBY may not be available in older Excel versions.

Solution 1Recommended

Use Dynamic Array Functions (UNIQUE, HSTACK, PIVOTBY)

Utilize the latest Excel 365 functions to dynamically extract and summarize unique attendance records.

This method uses the LET function to define variables, UNIQUE and HSTACK to find distinct combinations of month, event, and email, and PIVOTBY to aggregate the counts automatically.

Note that PIVOTBY is a relatively new function and might currently be available only to Microsoft 365 Insiders. If it is unavailable, consider using the second solution.

1
Select the destination cell

Click on an empty cell where you want the summarized unique attendance data to appear.

2
Extract distinct records

Combine the criteria columns horizontally and extract the unique rows by using the formula: =UNIQUE(HSTACK(MONTH(date),event,email))

3
Apply LET and PIVOTBY

Wrap the distinct record logic inside a LET function and use PIVOTBY to count occurrences. Enter the full formula: =LET(distinct,UNIQUE(HSTACK(MONTH(date),event,email)), m,CHOOSECOLS(distinct,1), e,CHOOSECOLS(distinct,2), PIVOTBY(e,m,m,COUNT))

4
Generate the array

Press Enter to execute the formula. Excel will automatically spill the summarized matrix displaying unique attendee counts by event and month.

Use Dynamic Array Functions (UNIQUE, HSTACK, PIVOTBY)
Version Compatibility: If the PIVOTBY function returns a #NAME? error, your version of Excel 365 does not yet support it. You can use standard Pivot Tables or the UNIQUE function combined with COUNTIFS instead.
Advanced Data Analysis

Easily Count Unique Attendees Using WPS Spreadsheet

WPS Spreadsheet offers powerful data analysis tools, including dynamic array functions and advanced Pivot Tables, allowing you to easily summarize unique participants without needing expensive subscriptions.

  1. 1. Open your dataset: Launch WPS Spreadsheet and open the workbook containing your attendance dataset.
  2. 2. Insert a PivotTable: Select your entire data range, navigate to the 'Insert' tab on the top ribbon, and click 'PivotTable'.
  3. 3. Configure the PivotTable fields: In the PivotTable fields pane, drag 'Month' to the Columns area, 'Activity' to the Rows area, and 'Email' to the Values area.
  4. 4. Apply Distinct Count: Click on the 'Email' field dropdown in the Values area, select 'Value Field Settings', and choose 'Distinct Count' to summarize the unique participants automatically.
Free and lightweight alternative for robust data analysis.Fully compatible with Microsoft Excel formats (.xlsx).Built-in advanced Pivot Tables to quickly summarize distinct values.Familiar user interface ensuring a seamless migration from Microsoft Office.
microsoft office alternative - wps office

Frequently Asked Questions

Why does the PIVOTBY function return a #NAME? error?

The PIVOTBY function is currently rolling out and may only be available in the Microsoft 365 Insider Beta channel. If your Excel version doesn't support it yet, you should use standard Pivot Tables or a combination of the UNIQUE and COUNTIFS functions instead.

Can I count distinct values using standard Pivot Tables?

Yes. By checking the option to 'Add this data to the Data Model' when creating a Pivot Table, you can access the 'Distinct Count' aggregation option in the Value Field Settings. This allows you to count unique attendees without complex formulas.

What does the HSTACK function do in this scenario?

HSTACK horizontally combines the Month, Event, and Email arrays into a single contiguous dataset in memory. This allows the UNIQUE function to evaluate the unique combinations across all three columns simultaneously.

How can I extract a list of unique email addresses instead of just counting them?

You can use the UNIQUE function directly on the email column (e.g., =UNIQUE(C2:C100)). To extract unique emails for a specific month or activity, combine UNIQUE with the FILTER function to narrow down the dataset before extracting distinct values.