Return the Date of the First Positive Value in Excel
Question details
Return the header date associated with the first positive value across a row of monthly data.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet has dates in a header row and monthly values in the corresponding columns below.
- Observed behavior
- The user wants the date above the leftmost value greater than zero to appear in a result cell.
Check that the date headers and monthly values cover the same columns, with earlier months on the left. Keep the data cells numeric or blank, and adjust the ranges in the formula to match your worksheet.
Use INDEX and MATCH to Find the First Positive Value
Use this formula to return the date header above the leftmost positive value in a row.
MATCH finds the first value greater than zero from left to right, and INDEX returns the date in the corresponding header column. The result updates if the data changes; it is not a permanent entry timestamp.
Click an empty cell outside the monthly data range, such as N2, where you want the date to appear.
In the formula bar, enter =INDEX($B$1:$M$1,1,MATCH(TRUE,B2:M2>0,0)). Replace B1:M1 and B2:M2 with your header and data ranges if needed.
Press Enter. In older Excel versions, confirm the formula with Ctrl+Shift+Enter instead. If the result appears as a number, select the result cell and choose a date format from Home > Number Format.
Drag the result cell's fill handle down to calculate the matching header date for additional rows.

Find the First Positive Value's Date in WPS Spreadsheets
Use INDEX and MATCH in WPS Spreadsheets to return the header date associated with the first positive monthly value.
- 1. Open the workbook: Open WPS Spreadsheets and use File > Open to select your workbook.
- 2. Select the result cell: Click an empty cell outside the monthly data, such as N2.
- 3. Enter the formula: Type =INDEX($B$1:$M$1,1,MATCH(TRUE,B2:M2>0,0)) in the formula bar and press Enter. If your version requires array entry, confirm with Ctrl+Shift+Enter instead.
- 4. Format and fill: Use the Home tab's number format controls to display the result as a date, then drag the fill handle down for other rows.

Frequently Asked Questions
What happens if there are no positive values in the row?
MATCH returns #N/A when it finds no value greater than zero. Wrap the formula in IFERROR, such as =IFERROR(INDEX($B$1:$M$1,1,MATCH(TRUE,B2:M2>0,0)),""), to display a blank.
Why does the result show a number instead of a date?
Excel may be displaying the date's underlying serial number. Select the result cell and choose a date format from Home > Number Format.
Does this formula record the date when someone entered the value?
No. It returns a date from the header row and recalculates when the data changes. A permanent entry timestamp requires a different approach, such as VBA or an iterative calculation.
Which date is returned if several values are positive?
The formula returns the header above the first positive value from left to right. Put the months in chronological order if you want that to represent the earliest month.




