Find the Next Non-Blank Monthly Value in Excel
Question details
Find a formula that returns the current month's value or the next available non-blank value in a calendar table.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A row contains values under monthly headers, and the user wants to search from the current month forward.
- Observed behavior
- The desired result is the current month's value if present; otherwise, the next non-blank value in a later month.
Arrange the month headers from earliest to latest and confirm that the current month is included. The example below assumes B1:M1 contains text headers such as Jan 2026 and B4:M4 contains the values to search.
Use INDEX and MATCH to search from the current month
Use this array formula when month headers are text in the MMM YYYY format and you need to search across multiple future months.
The formula finds the current month in the header row, then returns the first value at or after that position that is not blank. A zero counts as a value, while a cell containing a formula that returns an empty string is skipped.
Click an empty cell outside B4:M4 where you want the result to appear.
In the formula bar, enter =IFERROR(INDEX(B4:M4,1,MATCH(1,(B4:M4<>"")*(COLUMN(B4:M4)-COLUMN(B4)+1>=MATCH(TEXT(TODAY(),"mmm yyyy"),B$1:M$1,0)),0)),""). Adjust the header and value ranges together if your table uses different columns.
Press Enter in a current version of Excel. In older versions, press Ctrl+Shift+Enter to enter it as an array formula.
Select the result cell and drag its fill handle down to search the corresponding value row for each record.

Find the Next Monthly Value in WPS Spreadsheet
Use INDEX and MATCH in WPS Spreadsheet to search a monthly row from the current month and return the first non-blank value.
- 1. Open the workbook: Open WPS Spreadsheet and select Open to load your Excel workbook.
- 2. Check the table: Confirm that B1:M1 contains chronological text headers such as Jan 2026 and that B4:M4 contains the values to search.
- 3. Enter the formula: Select an empty result cell and enter =IFERROR(INDEX(B4:M4,1,MATCH(1,(B4:M4<>"")*(COLUMN(B4:M4)-COLUMN(B4)+1>=MATCH(TEXT(TODAY(),"mmm yyyy"),B$1:M$1,0)),0)),""). Adjust the ranges to match your table.
- 4. Confirm and copy: Press Enter to calculate the result. If your version requires array entry, use Ctrl+Shift+Enter; then drag the fill handle down to apply the formula to other rows.

Frequently Asked Questions
What happens if the current month's cell contains zero?
The formula treats zero as a non-blank value and returns it. It skips empty cells and formulas that return an empty string.
Why does the formula return a blank result?
Check that the current month appears in B1:M1 as matching text and that there is a non-blank value in B4:M4 at or after that month. IFERROR also returns a blank if the formula encounters an error.
Can I use the formula if my month headers are real Excel dates?
Yes, if each header is the first day of its month. Replace MATCH(TEXT(TODAY(),"mmm yyyy"),B$1:M$1,0) with MATCH(DATE(YEAR(TODAY()),MONTH(TODAY()),1),B$1:M$1,0). Formatting a date as MMM YYYY does not turn it into text.
How do I apply the formula to several rows?
Select the result cell and drag its fill handle down. The value range changes to each row, while the dollar signs keep the header range on row 1.




