+ Reply to Thread
Results 1 to 3 of 3

Get value of last non blank cell in a column on different worksheet

  1. #1
    Registered User
    Join Date
    12-05-2007
    Location
    Oklahoma
    MS-Off Ver
    2003, 2007
    Posts
    22

    Get value of last non blank cell in a column on different worksheet

    I am trying to get the value of the last non blank cell in a column on different a worksheet. The example below works perfect if everything is on one worksheet, but I am needing this to work with the data being on Sheet2 and the results of the formula to appear in cell B1 of Sheet1 since the database on Sheet2 will be rather large. Does anyone anyone know how to make this work?

    Example:
    1 AAA
    2 BBB
    3 CCC
    4 DDD
    5 AAA
    6 CCC
    7 AAA
    8 BBB
    9 DDD
    10 AAA
    11 CCC
    12 AAA
    13 DDD
    14 DDD

    Enter the following formula in cell B1: =OFFSET(A1,COUNTA(A:A)-1,0)

    The result: DDD
    Last edited by eriknokc; 03-13-2010 at 08:28 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Get value of last non blank cell in a column on different worksheet

    =OFFSET(Sheet2!A1,COUNTA(Sheet2!A:A)-1,0)
    or better
    =LOOKUP(REPT("z",255),Sheet2!A:A) will return the last cell with text in
    Last edited by martindwilson; 03-13-2010 at 08:28 PM.
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    12-05-2007
    Location
    Oklahoma
    MS-Off Ver
    2003, 2007
    Posts
    22

    Re: Get value of last non blank cell in a column on different worksheet

    I swear I tried that but it didn't work, now I try it by copy and pasting what you put and it works. Maybe I had something slightly off. Thanks for your assistance.

+ 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