Count Unique Dates by Name in Excel While Ignoring Time
Question details
Count the distinct calendar dates associated with a specific name, ignoring the time in each timestamp.

- Product
- Microsoft Excel for Microsoft 365
- Device & OS
- not provided
- Scenario
- A large worksheet contains timestamps and names, and the user needs a unique date count for one name.
- Observed behavior
- The desired count includes each calendar date only once, regardless of how many different times appear on that date.
Check that column A contains actual Excel date-time values and column B contains names. The example uses rows 2 through 28000 and places the name to look up in E2.
Count distinct dates with FILTER, INT, and UNIQUE
Use this formula in Excel for Microsoft 365 to count dates for the name in E2 while excluding blank and text timestamps.
FILTER selects numeric timestamps for the specified name, INT removes their time portions, and UNIQUE keeps one value per date. ROWS counts the resulting dates; IFERROR returns zero when no matching numeric timestamps are found.
Type the name to count, such as John Doe, in cell E2.
Select an empty cell and enter =IFERROR(ROWS(UNIQUE(INT(FILTER(A2:A28000,(B2:B28000=E2)*ISNUMBER(A2:A28000))))),0).
Press Enter. Adjust the row ranges in the formula if your data extends beyond row 28000, keeping both ranges the same size.

Count unique dates by name in WPS Spreadsheets
Use a helper column and Remove Duplicates in WPS Spreadsheets to count calendar dates without counting different times separately.
- 1. Open the worksheet: Open the Excel file in WPS Spreadsheets. Confirm that timestamps are in column A and names are in column B.
- 2. Create date-only values: Add a header such as Date in C1. In C2, enter =IF(ISNUMBER(A2),INT(A2),"") and fill the formula down through the data.
- 3. Filter by name: Select the table, choose Data > Filter, and use the filter arrow in column B to show only the name you want.
- 4. Copy and deduplicate dates: Copy the visible Date header and cells to a new sheet using Paste Special > Values. Select the pasted date column and choose Data > Remove Duplicates, selecting the date column if prompted.
- 5. Count the dates: In an empty cell outside the pasted date column, enter =COUNT(A:A), replacing A with the pasted column letter. COUNT ignores the header and any blank cells.

Frequently Asked Questions
Why does INT remove the time from an Excel timestamp?
Excel stores a date as a whole-number serial value and its time as a fractional part. INT returns the whole-number date, so timestamps on the same date match.
What happens if the name has no matching dates?
The formula returns 0 through IFERROR when FILTER finds no matching numeric timestamps. If matches should exist, check the name and whether the timestamps are stored as numbers.
Will the formula count dates stored as text?
No. ISNUMBER excludes text values, including text that looks like a date. Convert those entries to actual Excel date-time values before using the formula.
Can I use the formula in an older version of Excel?
The formula requires FILTER and UNIQUE, which are available in Excel for Microsoft 365 but not in many older versions. In an older version, use a date-only helper column, filter the name, and remove duplicate dates from a copied list.




