+ Reply to Thread
Results 1 to 5 of 5

Last Value

  1. #1
    Registered User
    Join Date
    08-09-2009
    Location
    Brentwood, TN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Last Value

    =INDEX(B2:F2,1,MAX(IF(B2:F2<>"",COLUMN(B2:F2)))-COLUMN(B2)+1)

    I have used the above formula - it is exactly what i want but i am getting a #VALUE result. What have i done wrong?

    Moved to correct forum, added link to thread being referenced.

    http://www.excelforum.com/tips-and-t...-in-a-row.html
    Last edited by Paul; 08-10-2009 at 04:48 PM. Reason: Moved to correct forum

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrieving the Last Value and the Last Character in a Row

    Quote Originally Posted by ExcelTip View Post
    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
    I think part of that second formula is missing. But an array formula is not required to find the last value in a range, a normal lookup will do it:

    =LOOKUP(2, 1/(B2:F2<>""), B2:F2)
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    08-09-2009
    Location
    Brentwood, TN
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Retrieving the Last Value and the Last Character in a Row

    Thank-you - works perfectly!

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Retrieving the Last Value and the Last Character in a Row

    If that takes care of your need, be sure to EDIT your original post, click Go Advanced and mark the PREFIX box [SOLVED].


    (Also, use the blue "scales" icon in our posts to leave Reputation Feedback, it is appreciated)

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Last Value

    Please do not hijack old threads - I have moved all posts to a new thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1