+ Reply to Thread
Results 1 to 6 of 6

Finding last value in array?

  1. #1
    Registered User
    Join Date
    05-06-2007
    Posts
    2

    Finding last value in array?

    I think the thread says it all . Basically, the data in an array changes when I change the settings of the numbers I input, so the final value constantly changes. I need a way to "find" the last value in the array and display it in a cell, is there a way of doing this using a function, or otherwise?

    Cheers Dr.K.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    Lets assume the data is in column A, use this formula:

    =OFFSET($A$1,COUNTA(A:A),0)

    Let me know if that works.

  3. #3
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by drkarl
    I think the thread says it all . Basically, the data in an array changes when I change the settings of the numbers I input, so the final value constantly changes. I need a way to "find" the last value in the array and display it in a cell, is there a way of doing this using a function, or otherwise?

    Cheers Dr.K.
    Try this as well

    =LOOKUP(2,1/(A1:A100<>""),A1:A100)

  4. #4
    Registered User
    Join Date
    05-06-2007
    Posts
    2
    Quote Originally Posted by starguy
    Try this as well

    =LOOKUP(2,1/(A1:A100<>""),A1:A100)
    Fantastic, worked a treat. I knew it was something like this but couldn't figure it out. Cheers for your reply BigBas too.

  5. #5
    Forum Contributor
    Join Date
    03-14-2006
    Location
    Pakistan
    Posts
    1,791

    Lightbulb

    Quote Originally Posted by drkarl
    Fantastic, worked a treat. I knew it was something like this but couldn't figure it out. Cheers for your reply BigBas too.
    You're welcome and thank you for the feedback.

  6. #6
    Registered User
    Join Date
    11-22-2013
    Location
    Johannesburg, South Africa
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Finding last value in array?

    Quote Originally Posted by starguy View Post
    Try this as well

    =LOOKUP(2,1/(A1:A100<>""),A1:A100)
    Can you please explain exactly how this formula works? It works beautifully but I can't wrap my head around the arguments.

+ 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