+ Reply to Thread
Results 1 to 7 of 7

Find the latest date based on a condition from a range of data that is unlimited

  1. #1
    Registered User
    Join Date
    10-24-2020
    Location
    Dubai
    MS-Off Ver
    2016
    Posts
    32

    Find the latest date based on a condition from a range of data that is unlimited

    Hello Everyone,

    I am trying to find the latest date based on a condition from a range of data that is unlimited. i can do it if the range is limited and defined but i am having trouble trying to figure out what to do if the range is unlimited. i can't use Maxifs because i have excel 2016. Here is what i have...

    I have a register that is auto-generated from an invoice using vba. It contains a date column and a customerid column.

    First Sheet: Register
    InvoiceDate CustomerID
    17-Feb-21 1
    18-Feb-21 2
    18-Feb-21 1
    12-Jan-20 3
    12-Dec-20 4
    14-Mar-20 1
    17-Jul-20 2
    19-Feb-20 1
    19-Feb-20 2
    Both the date and customerid columns are autogenerated daily

    I made a second sheet called "Latest". In this sheet, i want to know the latest date that an invoice was generated for a customer. So when i enter customerid no. 1 in the first column, the second column should automatically give me the latest invoice generated for this customer.

    Sheet:Latest
    CustomerID Latest Invoice Date
    1 ?

    The user can enter any CustomerID in the first column
    The second column should automatically show the latest date from the Date column in the Register sheet

    I would be grateful for any advise.
    Thank you in advance.

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,213

    Re: Find the latest date based on a condition from a range of data that is unlimited

    One way:

    =LOOKUP(2,1/(Sheet1!$B$2:$B$10=Sheet2!A2),Sheet1!$A$2:$A$10)

    Text time, attach a sample sheet (see yellow banner, top of page)... rtaher than telling us about it.
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Registered User
    Join Date
    10-24-2020
    Location
    Dubai
    MS-Off Ver
    2016
    Posts
    32

    Re: Find the latest date based on a condition from a range of data that is unlimited

    Hi Glenn
    Thank you so much for your quick reply. i tried attaching a sample file but apparently i dont have 'permission' to attach files. Anyway thank you so much for the solution...it works perfectly in my actual file. I was trying with max and index and vlookup and i couldn't get it. The one you gave is perfect. Thank you again. Bless you

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Find the latest date based on a condition from a range of data that is unlimited

    Yes, you do have permission to attach files - everybody does!!! But it needs to be a sample workbook, not your full dataset - were you trying to attach a huge file?
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

  5. #5
    Registered User
    Join Date
    10-24-2020
    Location
    Dubai
    MS-Off Ver
    2016
    Posts
    32

    Re: Find the latest date based on a condition from a range of data that is unlimited

    hi, it was a sample file. small one. the message i got was...

    you do not have permission to access this page. This could be due to one of several reasons:
    1. Your user account may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
    2. If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.

    anyway i sent a message to the forum/site administrator...i am waiting for their reply.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Find the latest date based on a condition from a range of data that is unlimited

    You must have done something wrong. Follow the instructions in the yellow banner at the top of the page next time.

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,483

    Re: Find the latest date based on a condition from a range of data that is unlimited

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

    Also, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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. value based from date range based on criteria of date that is latest in fiscal year
    By haroonkhurshid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-13-2020, 03:00 PM
  2. find the latest row based on ID and date submitted
    By yaksh420 in forum Excel Formulas & Functions
    Replies: 11
    Last Post: 07-20-2018, 10:47 AM
  3. [SOLVED] Find Latest Date in a range with IF Statements
    By Alphabex in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-27-2017, 12:14 PM
  4. [SOLVED] Find the latest price based on the date
    By jackson_hollon in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-14-2016, 01:03 PM
  5. Find latest date from variable range
    By Eatmybrain in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-20-2016, 01:32 PM
  6. Replies: 3
    Last Post: 03-22-2014, 01:54 PM
  7. Replies: 1
    Last Post: 04-04-2012, 08:21 AM

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