Results 1 to 8 of 8
  1. #1
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Last Value in range (X2K)

    I am looking for a formula that will give me the last value in a column of figures. I am sure this has been posted before but I could not find it in search <img src=/S/sad.gif border=0 alt=sad width=15 height=15>

    Many Thanks

    Peter

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Last Value in range (X2K)

    For instance, to find the value of the last used cell in column A, use this formula:

    =OFFSET(A2,MATCH(9.99999999999999E+307,A2:A65536), 0)

    I found this formula by Rory in <post#=168137>post 168137</post#> by searching for "last cell column", search option "And".

  3. #3
    3 Star Lounger
    Join Date
    Jun 2001
    Location
    Maidstone, Kent, England
    Posts
    398
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Last Value in range (X2K)

    Thanks Hans <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  4. #4
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Last Value in range (X2K)

    How about the last numerical (as opposed to text) value in a row?














    0

  5. #5
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Last Value in range (X2K)

    Try something like:
    =OFFSET(A2,0,MATCH(9.99999999999999E+307,2:2)-1)
    if your formula is in A1. You will need to adjust the cell and row numbers according to where your formula is and which row you're looking in. (It's basically the same formula as for columns, but swapping the 0 and the MATCH expression round in the OFFSET function)
    HTH.
    Regards,
    Rory

    Microsoft MVP - Excel

  6. #6
    3 Star Lounger
    Join Date
    Jan 2002
    Location
    The Hague, Netherlands
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Last Value in range (X2K)

    You don't need volatile OFFSET...

    Either

    =INDEX(A:A,MATCH(9.99999999999999E+307,A:A))

    or

    =LOOKUP(9.99999999999999E+307,A:A)
    Microsoft MVP - Excel

  7. #7
    3 Star Lounger
    Join Date
    Jan 2002
    Location
    The Hague, Netherlands
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Last Value in range (X2K)

    =LOOKUP(9.99999999999999E+307,2:2)

    or

    =INDEX(2:2,MATCH(9.99999999999999E+307,2:2)

    will return the last numeric value (a number, a date, or a time value).

    The formula is also applicable to definite ranges...

    =LOOKUP(9.99999999999999E+307,A2:M2)
    Microsoft MVP - Excel

  8. #8
    Bronze Lounger
    Join Date
    Jan 2001
    Posts
    1,418
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Last Value in range (X2K)

    Thanks, Aladin-both work just fine!

Posting Permissions

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