ExcelTip.com
ExcelTip.com
Account Icon Account Icon Account Icon
Google Exceltip.com
JOIN OUR NEWSLETTER
  and receive for joining:
Free eBook Learn More!
Free Excel ADD-IN
Free Weekly Excel Tip
4 e-books in cd-rom
F1 Formulas & Functions
F1 Formulas & Functions
F1 EXCEL
F1 eBook (Spanish)
F1 EXCEL
Financial Statements.xls
 

» Retrieving the Column Header of the Next Non-Blank Cell in a Row
CATEGORY: Lookup Formulas


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: 5381

READER COMMENTS (view all comments)


No comments have been submitted.


REGISTERED USERS - Click here to post comments


GUESTS (Click here to register)
Name
Comment Title
Comments

Getting to Yes: Negotiating Agreement Without Giving In

The Basics of Finance: Financial Tools for Non Financial Managers

Marketing Plans

Keys to Reading an Annual Report (Barron's Business Keys)

Harry Potter and the Order of the Phoenix (Book 5)

Windows XP for Dummies

RELATED MICROSOFT EXCEL TIPS


Convert PDF Files to Excel


Excel VBA books
Accounting books
Business Plans
MS Office books
Taxes books

VIEW ALL BOOKS