Function Problems

Extract Names Inside or Outside a Time Range with Excel FILTER

Tauseeq MagsiTauseeq Magsi Dec 2, 2026 869 views

Question details

Extract names associated with times inside or outside a specified time range.

Extract Names Inside or Outside a Time Range with Excel FILTER
Product
Microsoft Excel
Device & OS
not provided
Scenario
A worksheet contains names and corresponding times that need to be filtered against start and end times.
Observed behavior
The desired result is a list of names matching either the inside-range or outside-range condition.
Before you start

For the examples below, place names in B3:B12, their corresponding times in C3:C12, the start time in C16, and the end time in D16. Ensure the time cells contain actual Excel time values and that the start time is earlier than or equal to the end time.

Solution 1Recommended

Use FILTER to extract names inside a time range

Use multiplication to require each time to meet both range boundaries.

1
Select an output cell

Click an empty cell with enough clear space below it for the matching names.

2
Enter the inside-range formula

Enter =FILTER(B3:B12,(C3:C12>=C16)*(C3:C12<=D16),"No matches") and press Enter.

3
Check the results

Review the spilled list in the output cells. Times equal to either boundary are included.

Use FILTER to extract names inside a time range
How the condition works: Multiplication acts as AND: a time must be at or after the start and at or before the end. FILTER requires a version of Excel that supports dynamic arrays.
Filter times in WPS Spreadsheet

Extract names by time range in WPS Spreadsheet

Use FILTER in a WPS Spreadsheet version that supports it to return names inside or outside your chosen time range.

  1. 1. Open the workbook: Open WPS Spreadsheet and select Open to choose your Excel workbook.
  2. 2. Set the time boundaries: Enter the start time in C16 and the end time in D16; place names in B3:B12 and corresponding times in C3:C12.
  3. 3. Filter the names: In an empty cell, enter =FILTER(B3:B12,(C3:C12>=C16)*(C3:C12<=D16),"No matches") and press Enter. For outside times, replace the condition with (C3:C12<C16)+(C3:C12>D16).
  4. 4. Save the workbook: Review the results, then select File > Save or Save As to save your changes.
Filter names using start and end time conditionsOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interfaceWork with spreadsheets for free
microsoft office alternative - wps office

Frequently Asked Questions

How do I include times equal to the start or end?

Use >= for the start comparison and <= for the end comparison, as in (C3:C12>=C16)*(C3:C12<=D16).

Why does the formula return No matches?

Check that C3:C12, C16, and D16 contain actual time values rather than text, and confirm that at least one time meets the selected conditions.

Can these formulas handle a range that crosses midnight?

Not as written. For a time-only range such as 10:00 PM to 2:00 AM, the inside condition is (C3:C12>=C16)+(C3:C12<=D16), and the outside condition is (C3:C12<C16)*(C3:C12>D16).

What if Excel does not recognize FILTER?

Check whether your Excel version supports FILTER and dynamic arrays. If it does not, use a supported version or filter the time column through Data > Filter.