+ Reply to Thread
Results 1 to 9 of 9

Find last row and return value

Hybrid View

  1. #1
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Find last row and return value

    I hope someone can help me with this, have been searching forums for hours!

    I have a sheet with customer data. I need a formula to find the last value entered in a column.
    In column D new data (order#) is being entered. This order# contains a number with text (for example 2012040021A041)
    I need a formula that looksup the last order number in column D.

    let's say these are the order# in column D
    2012050029A035
    2012050028A036
    2012040018A037
    2012040014A038
    2012050029A039
    2012050030A040
    2012040021A041

    What formula do I place in E1 which displays the last order#? in this case 2012040021A041

    Hope you can help me and thank you in advance

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Find last row and return value

    Try: =LOOKUP(REPT("Z";255);D:D)

    (Replace ; with , if getting error)

    Edit: You can not have only numbers in a column or it will return last TEXT value
    Never use Merged Cells in Excel

  3. #3
    Valued Forum Contributor
    Join Date
    10-17-2010
    Location
    Nottingham, England
    MS-Off Ver
    Excel 2003, 2007, 2010, 2013, 2016, 2019, 365
    Posts
    294

    Re: Find last row and return value

    This formula assumes you have no blank rows above to column title in column D:
    =INDEX(H:H,COUNTA(H:H))
    If you have blank rows, change it to
    =INDEX(H:H,COUNTA(H:H))+<number of blank rows>

    Edit - move the closing bracket, and reference column D!
    =INDEX(D:D,COUNTA(D:D))
    or
    =INDEX(D:D,COUNTA(D:D)+<number of blank rows>)
    Last edited by outofthehat; 06-15-2012 at 07:38 AM.

  4. #4
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Find last row and return value

    Thanks guys for helping me! in both solutions I get the following error:

    #NAME?

    I also tried to change ; into ,
    Didn't help.... any other suggestions? Really appreciate your help

  5. #5
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Find last row and return value

    Did you really change both?

    =LOOKUP(REPT("Z",255),D:D)

  6. #6
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Find last row and return value

    I made a mistake, sorry, i changed it and nothing came back. But this is due to the blank rows included. This will be the case, as there a blank rows with a formula inside, so what do I add to the formula?

    =LOOKUP(REPT("Z";255);D:D)

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Find last row and return value

    Doesn't matter...

    If you get space then there might be space in last row. It don't return blank cell.
    Attached Files Attached Files

  8. #8
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    16,040

    Re: Find last row and return value

    Oh, I just read..You have formula that return blank?

    Use this:

    =LOOKUP(2;1/(D:D<>"");D:D)
    Attached Files Attached Files
    Last edited by zbor; 06-15-2012 at 07:56 AM.

  9. #9
    Registered User
    Join Date
    04-23-2012
    Location
    Amsterdam, Netherlands
    MS-Off Ver
    Excel 2007
    Posts
    24

    Re: Find last row and return value

    WORKED!!!!!!!!!!! Thank you so so much!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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