+ Reply to Thread
Results 1 to 15 of 15

Search Data in last complete row

  1. #1
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Search Data in last complete row

    I have a table that has the dates of the year A1:A365. Then I have operator names (Joe, Mary, Susan) in the B column. Each day, a name gets added to the list. How do I search for the latest/last entry and return the date? =(MAX(A1:A365)) gives me 12/31/2021, but I want the date of the last name entered in the B column that will update each time a name is added.
    Any help is appreciated.
    6/28/2021 Joe
    6/29/2021 Mary
    7/1/2021 Mary
    7/2/2021 Susan
    7/3/2021
    7/4/2021
    7/5/2021
    7/6/2021
    Last edited by localheromx; 07-12-2021 at 01:18 PM.

  2. #2
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Search Data in last complete row

    Try this in Column C to get the date, it should return the date of the last entry

    Please Login or Register  to view this content.
    Sorry i had deleted a column after i posted and didnt update the formula

    In column C place the above corrected formula.
    Attached Images Attached Images
    Last edited by cubangt; 07-12-2021 at 02:17 PM.
    If you find the suggestion or solution helpful, please consider adding reputation to the post.

  3. #3
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: Search Data in last complete row

    Hmmm... it didn't work for me:
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,212

    Re: Search Data in last complete row

    TRy

    =LOOKUP(2,1/(B1:B7<>""),A1:A7)

  5. #5
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: Search Data in last complete row

    Quote Originally Posted by JohnTopley View Post
    TRy

    =LOOKUP(2,1/(B1:B7<>""),A1:A7)
    That did it! Thanks

  6. #6
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Search Data in last complete row

    corrected formula in previous post.

  7. #7
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: Search Data in last complete row

    One more twist..... What if I wanted the 2nd to last entry? (7-1-2021)

  8. #8
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: Search Data in last complete row

    I don't know if this is the correct way or not, but adding -1 to the end worked. =LOOKUP(2,1/(B1:B7<>""),A1:A7)-1

  9. #9
    Valued Forum Contributor
    Join Date
    05-15-2017
    Location
    US
    MS-Off Ver
    365
    Posts
    901

    Re: Search Data in last complete row

    If you are using my suggestion you can subtract 1 row like so;

    Please Login or Register  to view this content.
    Notice the -1 in bold
    =INDEX(A:B,MATCH(LOOKUP(2,1/(B:B<>""),B:B),B:B,0)-1,1)

  10. #10
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,212

    Re: Search Data in last complete row

    Try

    =INDEX(A1:A7,MATCH(LOOKUP(2,1/(B1:B7<>""),A1:A7),A1:A7,0)-1)

  11. #11
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: Search Data in last complete row

    These suggestions all work! But I keep running into other issues..... What if there wasn't an entry in the middle? Each of these solutions find the most recent (Date & Name) and then -1 row. Instead of -1 Date & Name combination. How do I return 7-6-2021 Toukta (in my example) as the next to last Date & Name?
    Screenshot 2021-07-13 043657.png
    Attached Files Attached Files

  12. #12
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,212

    Re: Search Data in last complete row

    Try

    =INDEX($A$1:$A$7,AGGREGATE(15,6,ROW($A$1:$A$7)/($B$1:$B$7<>""),COUNTIF($B$1:$B$7,"<>")-1))

  13. #13
    Registered User
    Join Date
    07-12-2021
    Location
    Salt Lake, UT
    MS-Off Ver
    2010
    Posts
    19

    Re: Search Data in last complete row

    Genius! Thanks a lot for your help.

  14. #14
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2016
    Posts
    5,914

    Re: Search Data in last complete row

    Or try:

    =INDEX($A$1:$A$7,AGGREGATE(14,6,ROW($A$1:$A$7)/($B$1:$B$7<>""),2))

  15. #15
    Forum Expert wk9128's Avatar
    Join Date
    08-15-2020
    Location
    Australia
    MS-Off Ver
    365 V2403 and WPS V2022
    Posts
    3,439

    Re: Search Data in last complete row

    Array formula

    HTML Code: 

+ 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. [Userform] Complete Search box using text box or Combobox.
    By thebeastslayer in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-01-2020, 12:16 PM
  2. Replies: 2
    Last Post: 07-21-2019, 05:52 AM
  3. Need help modifying VBA function to search only complete words.
    By Invisible Hand in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 03-21-2014, 12:49 AM
  4. [SOLVED] Auto-complete / Suggested Search
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-27-2013, 10:02 AM
  5. Auto-complete / Suggested Search
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 07-27-2013, 10:01 AM
  6. Auto-complete / Suggested Search
    By onmyway in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-25-2013, 08:05 AM
  7. [SOLVED] Search for multiple amounts and copy complete row
    By abjac in forum Excel Programming / VBA / Macros
    Replies: 13
    Last Post: 02-19-2013, 05:11 PM

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