Return the First Positive Value's Date With an Excel Formula
Question details
Find the first value greater than zero across a row and return the corresponding date from another row without nested IF statements.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A row of formula results is aligned by column with a row of dates.
- Observed behavior
- The desired result is the date in the first column where the formula result is positive.
Check that the values in B50:CM50 are numeric results and that B41:CM41 contains the corresponding dates in the same columns. Choose an empty cell for the result and confirm which Excel version you use.
Use XLOOKUP to return the date of the first positive value
Use this formula in Microsoft 365 or Excel 2021 to return one matching date or a blank if there is no match.
Select an empty cell and enter =XLOOKUP(TRUE,B50:CM50>0,B41:CM41,"",0).
Press Enter, then select the result cell and choose a date format from Home > Number if it displays as a serial number.

Use INDEX and MATCH to find the corresponding date
Use this alternative when XLOOKUP is unavailable or you prefer an INDEX and MATCH formula.
Find the first positive value's date in WPS Spreadsheets
Use an INDEX and MATCH array formula in WPS Spreadsheets to return the date aligned with the first positive result in a row.
- 1. Open the workbook: Open WPS Spreadsheets and use Open to select your workbook.
- 2. Check the ranges: Verify that B50:CM50 contains the results and B41:CM41 contains the corresponding dates, or adjust the ranges to match your sheet.
- 3. Enter the formula: Select an empty cell and enter =INDEX(B41:CM41,1,MATCH(TRUE,B50:CM50>0,0)). Press Enter, or use Ctrl+Shift+Enter if your version requires array-formula confirmation.
- 4. Format the date: Select the result cell and choose a date format from the Home tab's number-format controls if the result appears as a number.

Frequently Asked Questions
What happens if there are no positive values?
The XLOOKUP formula returns a blank because its fourth argument is "". The INDEX and MATCH formula returns #N/A unless you handle the error, for example with IFERROR.
Why does the date appear as a number?
Excel stores dates as serial numbers. Select the result cell and choose a date format from Home > Number.
Why do I see a #SPILL! error?
A direct comparison such as B50:CM50>0 can return an array that needs space in adjacent cells. Use the XLOOKUP or INDEX and MATCH formula to return a single date; if another formula must spill, clear its intended output range.
Can I use different rows or columns?
Yes. Replace B50:CM50 with your value range and B41:CM41 with your date range. Keep the ranges the same width and align each date with its value.
Does zero count as a positive value?
No. The condition >0 excludes zero. Change it to >=0 in the formula if you want to include zero.




