Function Problems

How to Count Members by Country Who Visited at Least Once in Excel

Rana GarciaRana Garcia Nov 11, 2026 869 views

Question details

The user needs to calculate the total number of members from a specific country (e.g., Ukraine) who visited a cafe on at least one of multiple specified days using Excel formulas.

How to Count Members by Country Who Visited at Least Once in Excel
Product
Excel
Device & OS
not provided
Scenario
Analyzing attendance or visit data across multiple days to count unique members based on their nationality using dynamic arrays.
Observed behavior
Requires a functional dynamic-array formula to filter and count data based on a country lookup and multiple attendance conditions.
Before you start

Ensure that your data is formatted as Excel Tables (e.g., Table1 for member details and Table2 for attendance) so the structured references in the formula work correctly. Also, verify that your version of Excel or WPS Spreadsheet supports dynamic-array functions like LET and FILTER.

Solution 1Recommended

Use LET and FILTER Functions to Count Members

This method combines the LET, FILTER, and VLOOKUP functions to isolate members who visited on specific days and then count those matching the target country.

The LET function allows you to define variables within your formula, making it easier to read and calculate faster. By filtering for members with at least one 'Y' on Monday, Thursday, or Saturday, and then looking up their country, you can accurately count the target demographic.

1
Select the destination cell

Click on the empty cell where you want the final count result to be displayed.

2
Enter the LET and FILTER formula

Type the following formula into the formula bar: =LET(id,FILTER(Table2[Member ID],(Table2[Mon]="Y")+(Table2[Thu]="Y")+(Table2[Sat]="Y")),f,FILTER(id,VLOOKUP(id,Table1,3,FALSE)="Ukraine",""),COUNTA(f))

3
Calculate the result

Press the Enter key to execute the formula. Excel will dynamically calculate and return the total number of members matching your criteria.

Use LET and FILTER Functions to Count Members
Understanding the Formula Logic: The '+' operator in the FILTER function acts as an 'OR' logical condition. This means the formula includes members who visited on Monday OR Thursday OR Saturday.
Efficient Data Analysis with WPS Office

Use WPS Spreadsheet to Handle Complex Dynamic Formulas

WPS Spreadsheet fully supports advanced functions like LET, FILTER, and VLOOKUP, allowing you to seamlessly analyze and count condition-based data just like in Microsoft Excel.

  1. 1. Open your data file: Launch WPS Spreadsheet and open the workbook containing your member and attendance data.
  2. 2. Organize data as tables: Ensure your datasets are properly formatted as Tables so structured references function correctly.
  3. 3. Input the dynamic formula: Select your target cell and paste the LET and FILTER formula to calculate the targeted visitor count.
  4. 4. Review results: Press Enter to instantly view your filtered count and analyze the conditional data.
Fully compatible with Microsoft Excel formulas and table formatsNative support for dynamic arrays and advanced data filteringFree, lightweight, and user-friendly interface for effortless data analysis
microsoft office alternative - wps office

Frequently Asked Questions

What if my Excel version doesn't support the LET function?

If you are using an older version of Excel that lacks support for dynamic arrays like LET or FILTER, you will need to rely on a complex combination of SUMPRODUCT, INDEX, and MATCH, or upgrade to a modern version like Microsoft 365 or WPS Office.

How can I change the formula to count members from a different country?

To count members from another country, simply replace the text "Ukraine" in the VLOOKUP portion of the formula with the name of the new target country, making sure it exactly matches the text in your source table.

Can I add more days to the visit filter condition?

Yes, you can include additional days by appending another addition condition inside the first FILTER function. For example, add +(Table2[Wed]="Y") to also include members who visited on Wednesday.