How to Find the First Negative Value and Date in Excel
Question details
The user wants to identify the first date a row of monthly values drops below zero, extract that negative value, and calculate the elapsed time from the start date.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Financial tracking or inventory management where negative balances need to be flagged dynamically along with the exact occurrence date and the time elapsed since the start.
- Observed behavior
- Requires specific Excel formulas to evaluate an array horizontally, find the first value less than zero, and return associated data from a header row.
Ensure your dates in the header row are formatted as actual Excel Date values (not text), and that the monthly data contains numeric values so the formulas can correctly calculate differences and evaluate conditions.
Use XLOOKUP to Find the Negative Value (Recommended for Microsoft 365)
Use the XLOOKUP function to easily check a condition across an array and return the corresponding date and value.
The XLOOKUP function allows you to evaluate an entire row against a logical condition (such as finding numbers less than zero) and instantly return data from a parallel row.
Click on the cell where you want the date to appear (e.g., G3). Enter the formula =XLOOKUP(TRUE,A3:D3<0,$A$2:$D$2). This assumes your dates are in A2:D2 and your monthly values are in A3:D3.
In the next cell (e.g., H3), type =XLOOKUP(G3,$A$2:$D$2,A3:D3) to return the specific negative number associated with the date you just found.
To find the time elapsed from the first date in your range, select a new cell (e.g., I3) and enter =G3-$A$2. If the result shows as a date, change the cell format to 'General' or 'Number' to see the elapsed days.

Use INDEX and MIN(IF) for Older Excel Versions
For versions of Excel that do not support XLOOKUP, use an array formula combining INDEX, MIN, and IF.
Quickly Find Values with XLOOKUP in WPS Spreadsheet
WPS Spreadsheet fully supports modern array functions like XLOOKUP, making it incredibly easy to find first negative values and manipulate dates without relying on complex legacy formulas.
- 1. Open your data file: Launch WPS Spreadsheet and open your existing Excel (.xlsx) file containing the monthly data.
- 2. Enter the XLOOKUP formula: Select a blank cell and type =XLOOKUP(TRUE, A3:D3<0, $A$2:$D$2) to instantly extract the date of the first negative value.
- 3. Format the elapsed time: Calculate the elapsed time with simple subtraction (e.g., =G3-$A$2), then use the quick ribbon toolbar to change the format from Date to Number.

Frequently Asked Questions
Why does my date formula return a strange number like 44000?
Excel stores dates as sequential serial numbers for calculation purposes. If your formula returns a 5-digit number instead of a date, select the cell, right-click, choose 'Format Cells', and apply a 'Date' format.
Can I use VLOOKUP to find the first negative value in a row?
VLOOKUP searches vertically down columns, so it won't work well for data organized in horizontal rows. While HLOOKUP can search rows, it cannot easily evaluate conditions like 'less than zero'. XLOOKUP or INDEX/MATCH is required for this specific task.
What happens if there are no negative values in the row?
If the condition is never met, the XLOOKUP formula will return an #N/A error. You can wrap your formula in an IFERROR function, like =IFERROR(XLOOKUP(TRUE,A3:D3<0,$A$2:$D$2), "No Negatives"), to display a custom text message instead.




