How to Return the Date When an Excel Value Reaches Zero
Question details
Find the specific date in a dataset when a declining series of values hits zero or drops into negative numbers.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Tracking a declining data series, such as inventory or budget countdowns, to identify the exact date a threshold is crossed.
- Observed behavior
- The user needs a formula to automatically extract the corresponding date from an adjacent column when the target value condition (zero or less) is met.
Ensure your dataset is sorted chronologically and that your date column is properly formatted as Dates, rather than plain text.
Use the XLOOKUP Function (Modern Excel)
The XLOOKUP function is the most efficient way in modern spreadsheet software to search for the first instance where a value meets a specific condition.
By leveraging the boolean logic inside XLOOKUP, you can evaluate an entire range for a specific condition and return the corresponding item from an adjacent range.
Locate your date range (for example, A2:A8) and your declining value range (for example, B2:B8).
Select the empty cell where you want the result to appear and type the formula `=XLOOKUP(TRUE, B2:B8<=0, A2:A8)`.
Press Enter. If the result appears as a standard number, right-click the cell, select 'Format Cells', choose the 'Date' category, and apply your preferred format.

Use INDEX, MIN, and IF Functions (Legacy Excel)
If you are using an older version of Excel that does not support the XLOOKUP function, you can use an array formula combining INDEX, MIN, IF, and ROW.
Easily Track Declining Values with WPS Spreadsheet
WPS Office provides robust formula support, including advanced lookup functions like XLOOKUP, allowing you to easily find threshold dates and manage your data efficiently.
- 1. Open your dataset in WPS Spreadsheet: Launch WPS Office and open the workbook containing your declining data and dates.
- 2. Input the threshold formula: Select an empty cell and enter the formula `=XLOOKUP(TRUE, B2:B8<=0, A2:A8)` replacing the ranges with your actual data locations.
- 3. Format the result: Press Enter, right-click the cell, choose 'Format Cells', and select 'Date' to correctly view your threshold date.

Frequently Asked Questions
Why is my formula returning a 5-digit number like 44123 instead of a date?
Spreadsheet software stores dates as sequential serial numbers for calculation purposes. You need to change the cell format to a Date format by right-clicking the cell, selecting Format Cells, and choosing Date.
What happens if my values never reach zero?
If no value meets the condition, XLOOKUP will return an #N/A error. You can handle this gracefully by utilizing the optional 'if_not_found' argument inside XLOOKUP, such as `=XLOOKUP(TRUE, B2:B8<=0, A2:A8, "Target Not Reached")`.
Can I find the date when the value reaches a specific number other than zero?
Yes, simply adjust the logical test condition in the formula. For example, to find when the inventory drops below 50, change `B2:B8<=0` to `B2:B8<50` in your XLOOKUP statement.




