|  

» Retrieving the Column Header of the Next Non-Blank Cell in a Row

Problem:

Row 2 lists amounts payable over a twelve month period.
A blank cell in the row indicates that no payment is due that month.
We want to create a new row that, for each month, will display the name of the month in which the next payment is due.

Solution:

Use the INDEX, MATCH, MIN, IF, and COLUMN functions as shown in the following Array formula:
{=INDEX(C1:M1,MATCH(MIN(IF(C2:M2<>" ",COLUMN(C2:M2))),COLUMN(C2:M2)))}
Enter the formula in cell B3 and copy/paste it across the row from cell B3 up to cell M3.


Rate This Tip
12 34 5
Rating:     Views: 8088
No comments have been submitted.
Click here to post comment
For Registered Users
Name
Comment Title
Comments