Function Problems

How to Count Unique Names in an Excel Column on Mac with WPS Office

Elise WilliamsElise Williams Nov 13, 2026 869 views

Question details

The user needs a reliable formula to count distinct nonblank names in a column on a Mac, including Excel versions that do not support modern dynamic-array functions.

How to Count Unique Names in an Excel Column on Mac with WPS Office
Product
WPS Office Spreadsheets
Device & OS
macOS
Scenario
Counting the number of unique, nonblank names in a column in a worksheet on a Mac.
Observed behavior
The worksheet contains blank cells, and the user needs each distinct nonblank name counted once with a formula that works in older Excel for Mac versions.
Before you start

Confirm the exact range containing the names (C4:C641 in this example) and make sure blank cells do not contain spaces, tabs, or line breaks, because invisible characters can make otherwise identical names count separately.

Solution 1Recommended

Use SUMPRODUCT and COUNTIF to Count Unique Nonblank Names

Use this formula when you need compatibility with older Excel for Mac versions and WPS Office Spreadsheets without dynamic-array functions.

This classic formula divides each matched value by the number of times it appears, so every distinct nonblank name contributes exactly 1 to the total.

1
Select the result cell

Click an empty cell, such as E4, where you want the unique name count to appear.

2
Enter the classic formula

Type =SUMPRODUCT((C4:C641<>"")/COUNTIF(C4:C641,""&C4:C641)) into the formula bar.

3
Press Enter

Press Enter or Return on your Mac. The cell displays the number of distinct nonblank names in C4:C641.

Use SUMPRODUCT and COUNTIF to Count Unique Nonblank Names
Older Excel compatible: This formula works in Excel for Mac versions that do not support UNIQUE or FILTER, and in WPS Office Spreadsheets.
WPS Spreadsheets formula

Count Unique Names with WPS Office Spreadsheets on Mac

Open the same workbook in WPS Office Spreadsheets, use the SUMPRODUCT/COUNTIF formula, and get the unique nonblank name count without upgrading Microsoft Excel.

  1. 1. Open your workbook in WPS Office Spreadsheets: Launch WPS Office on your Mac and open the .xlsx or .xls file that contains the name column.
  2. 2. Select the result cell: Click an empty cell, for example E4, to hold the unique count.
  3. 3. Enter the compatible formula: Type =SUMPRODUCT((C4:C641<>"")/COUNTIF(C4:C641,""&C4:C641)) into the formula bar.
  4. 4. Press Enter to return the count: Press Return on your Mac. WPS Spreadsheets calculates the number of distinct nonblank names in the selected range.
  5. 5. Save the workbook: Save the file as .xlsx to preserve compatibility with Microsoft Excel.
Counts each distinct nonblank name once even in older filesNo modern dynamic-array functions requiredFull Microsoft Excel format compatibility, including .xlsx, .xlsm, and CSVFree, lightweight Office suite for macOSFamiliar Excel-like formulas and interface
microsoft office alternative - wps office

Frequently Asked Questions

Why does the SUMPRODUCT formula ignore blank cells?

Because the condition C4:C641<>"" creates TRUE/FALSE values; blank cells are excluded before COUNTIF divides the counts, so only nonblank names contribute.

Does this formula work in Excel for Mac 2019?

Yes. It uses SUMPRODUCT and COUNTIF, which do not require dynamic-array functions, so it works in Excel for Mac 2019 and earlier and in WPS Office.

Can I use a different range instead of C4:C641?

Yes. Replace C4:C641 with your actual range, such as A2:A500. Avoid selecting entire columns in very old Excel versions if performance becomes slow.

What if two names look the same but are counted separately?

Check for leading or trailing spaces, tabs, or line breaks. Clean the source data or create a helper column with =TRIM(C4) before counting.

Will this work in WPS Office Spreadsheets on Mac?

Yes. Open the file in WPS Office Spreadsheets, use the same formula, and press Return. The result matches Excel for Mac.