» Retrieving the Last Value and the Last Character in a Row
CATEGORY - Lookup Formulas
VERSION - All Microsoft Excel Versions
Range B2:F7 contains characters and numbers, each in an individual cell. Some of the cells in the range may be empty.
We want to retrieve both the last value (of any type) and the last character that appears in each row of the range.
Solution:
To find the last character for each row, use the HLOOKUP and REPT functions as shown in the following formula in column H:
=HLOOKUP(REPT("z",10),B2:F2,1)
To find the last value (of any type) in each row, use the INDEX, MAX, IF, and COLUMN functions as shown in the following Array formula in column I:
{=INDEX(B2:F2,1,MAX(IF(B2:F2<>"",COLUMN(B2:F2)))-COLUMN(B2)+1)}
Book Store:
Recommended Books:
- Accounting and Financial Fundamentals for Nonfinancial Executives
- MP Managerial Accounting w/ Topic Tackler, Net Tutor, & PowerWeb
- Special Edition Using Microsoft Excel 2002
- Real Estate Finance and Investments (Real Estate Finance and Investments, 11th Ed)
- Millionaire Real Estate Mentor : The Secrets of Financial Freedom through Real Estate Investing
- What the IRS Doesn't Want You to Know: A Cpa Reveals the Tricks of the Trade
No comments have been submitted.

