+ Reply to Thread
Results 1 to 7 of 7

Returning last value in a column

  1. #1
    Registered User
    Join Date
    07-30-2014
    Location
    Muscat
    MS-Off Ver
    window 2007
    Posts
    32

    Returning last value in a column

    Ive beentrying to write a function that retunrs the last none empty value in a column. note that some cells in same column will be empty. From the manual, the recommended function is =INDEX(A2:A30,MAX(ROW(A2:A30)×(A2:A30 《》""))). This assumes the range from A2 to A30 for example. However I try the function does not work. Any suggestion or help on this ?

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Returning last value in a column

    If the column contains numbers:
    =LOOKUP(1E+100,A:A)

    If the column contains text:
    =LOOKUP("zzzzz",A:A)
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    07-30-2014
    Location
    Muscat
    MS-Off Ver
    window 2007
    Posts
    32
    Quote Originally Posted by Glenn Kennedy View Post
    If the column contains numbers:
    =LOOKUP(1E+100,A:A)

    If the column contains text:
    =LOOKUP("zzzzz",A:A)
    Thanks Glenn. will give it a try

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning last value in a column

    If the range may contain either text or numbers...

    =LOOKUP(2,1/(A2:A30<>""),A2:A30)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  5. #5
    Registered User
    Join Date
    07-30-2014
    Location
    Muscat
    MS-Off Ver
    window 2007
    Posts
    32

    Re: Returning last value in a column

    Hi Glenn, tried to apply what you recommended but did not wok the way I expect. The closest I was looking for is =LOOKUP(2,1/(A2:A30<>""),A2:A30).

    Many thanks & regards

  6. #6
    Registered User
    Join Date
    07-30-2014
    Location
    Muscat
    MS-Off Ver
    window 2007
    Posts
    32

    Re: Returning last value in a column

    Hi Tony,
    Thanks a lot for your help and you have solved my problem.

    Regards,
    Saif

  7. #7
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Returning last value in a column

    You're welcome. Thanks for the feedback!


    If your question has been solved please mark the thread as being solved.

    In the menu bar above the very first post select Thread Tools, then select Mark this thread as solved.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Matching a value to a column, (rounding) and returning offset column value
    By jayinthe813 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-19-2013, 02:42 PM
  2. [SOLVED] Returning all the values in a column based on the column header
    By Benisato in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 10-10-2012, 11:19 AM
  3. Replies: 5
    Last Post: 09-12-2012, 01:27 PM
  4. [SOLVED] Returning most recent daily data in a column if blanks in column
    By InnesMcc in forum Excel General
    Replies: 6
    Last Post: 11-04-2011, 09:41 AM
  5. [SOLVED] Returning most recent daily data in a column if blanks in column
    By InnesMcc in forum Excel General
    Replies: 2
    Last Post: 11-04-2011, 06:28 AM
  6. Excel - returning column headers in a seperate column
    By ExcelConfused in forum Excel General
    Replies: 1
    Last Post: 03-28-2006, 09:55 AM

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