+ Reply to Thread
Results 1 to 10 of 10

Find the most recent entry in a table

Hybrid View

  1. #1
    Registered User
    Join Date
    04-29-2024
    Location
    Saskatchewan Canada
    MS-Off Ver
    365
    Posts
    31

    Find the most recent entry in a table

    Hi all,

    I have a formula (TEMPLATE O247)

    =IFNA(XLOOKUP(1,('IT0015'!$A:$A=$B$1)*('IT0015'!$X:$X=J252),('IT0015'!$Z:$Z)),0)

    I want to add that if the "Changed On" date is between Nov 1 & 15th to use the amount but if it's not, leave as 0

    for (TEMPLATE O249)

    =IFNA(XLOOKUP(1,('IT0014'!$A:$A=$B$1)*('IT0014'!$X:$X=J254),('IT0014'!$Z:$Z)),0)

    if IT0014 has an end date of 9999-12-31 OR start/end dates are between Nov 1-15 then return that value but if it's not, leave as 0
    Attached Files Attached Files
    Last edited by fysty0102; 11-04-2024 at 10:00 PM.

  2. #2
    Forum Expert azumi's Avatar
    Join Date
    12-10-2012
    Location
    YK, Indonesia
    MS-Off Ver
    Excel 365
    Posts
    2,406

    Re: Find the most recent entry in a table

    Try to upload your excel file to identify the problem more clear

  3. #3
    Registered User
    Join Date
    04-29-2024
    Location
    Saskatchewan Canada
    MS-Off Ver
    365
    Posts
    31

    Re: Find the most recent entry in a table

    My deepest apologies. I thought I had.

  4. #4
    Forum Contributor
    Join Date
    11-01-2024
    Location
    Korea
    MS-Off Ver
    M365 64bit v2411
    Posts
    272

    Re: Find the most recent entry in a table

    O247
    Formula: copy to clipboard
    =IFERROR(INDEX(SORT(FILTER('IT0015'!I1:L5000,
    ('IT0015'!A1:A5000=B1)*('IT0015'!J1:J5000=M247)
    *(TEXT('IT0015'!I1:I5000,"YYMM")="2411")
    *(TEXT('IT0015'!I1:I5000,"dd")<="15")
    ),1,-1),1,4), 0)


    O249
    Formula: copy to clipboard
    =IFERROR(INDEX(SORT(FILTER('IT0014'!I1:L5000,
    ('IT0014'!A1:A5000=B1)*('IT0014'!J1:J5000=M249)*
    ((TEXT('IT0014'!F1:F5000,"YYMMDD")="991231")
    +((TEXT('IT0014'!F1:F5000,"YYMMDD")="2411")*(TEXT('IT0014'!F1:F5000,"dd")<="15"))
    +((TEXT('IT0014'!G1:G5000,"YYMMDD")="2411")*(TEXT('IT0014'!G1:G5000,"dd")<="15"))
    ) ),1,-1),1,4), 0)
    Last edited by RhiSJ; 11-05-2024 at 04:28 AM.

  5. #5
    Registered User
    Join Date
    04-29-2024
    Location
    Saskatchewan Canada
    MS-Off Ver
    365
    Posts
    31

    Re: Find the most recent entry in a table

    Worked perfectly!

  6. #6
    Registered User
    Join Date
    04-29-2024
    Location
    Saskatchewan Canada
    MS-Off Ver
    365
    Posts
    31

    Re: Find the most recent entry in a table

    @RhiSJ

    Worked perfectly!! May I throw another variable in? Nov 1-16 is PP 22-2024 (A214:A273). How do we adjust the date look up so when I copy down to PP 23-2024 (A274:A325), it takes Nov 16-30 without manually adjusting the formula dates?
    Last edited by AliGW; 11-05-2024 at 09:14 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  7. #7
    Forum Contributor
    Join Date
    11-01-2024
    Location
    Korea
    MS-Off Ver
    M365 64bit v2411
    Posts
    272

    Re: Find the most recent entry in a table

    P247
    Formula: copy to clipboard
    =IFERROR(INDEX(SORT(FILTER('IT0015'!$I$1:$L$5000,
    ('IT0015'!$A$1:$A$5000=B1)*('IT0015'!$J$1:$J$5000=M247)
    *('IT0015'!$I$1:$I$5000>=MIN(B214:B273))
    *('IT0015'!$I$1:$I$5000<=MAX(B214:B273))
    ),1,-1),1,4), 0)


    p249
    Formula: copy to clipboard
    =IFERROR(INDEX(SORT(FILTER('IT0014'!$I$1:$L$5000,
    ('IT0014'!$A$1:$A$5000=B1)*('IT0014'!$J$1:$J$5000=M249)*
    (('IT0014'!$F$1:$F$5000=DATEVALUE("2099-12-31"))
    +('IT0015'!$I$1:$I$5000>=MIN(B214:B273))
    +('IT0015'!$I$1:$I$5000<=MAX(B214:B273))
    ) ),1,-1),1,4), 0)
    Last edited by RhiSJ; 11-05-2024 at 09:15 AM.

  8. #8
    Forum Expert shukla.ankur281190's Avatar
    Join Date
    05-17-2014
    Location
    Lucknow, India
    MS-Off Ver
    Microsoft® Excel® for Microsoft 365 MSO (Version 2503 Build 16.0.18604.20000) 64-bit
    Posts
    4,000

    Re: Find the most recent entry in a table

    Or can try

    O247
    Formula: copy to clipboard
    =IFERROR(LOOKUP(2,1/(('IT0015'!A1:A5000=B1)*('IT0015'!J1:J5000=M247)*(DAY('IT0015'!I1:I5000)<="15")),'IT0015'!L1:L5000),0)


    O249
    Formula: copy to clipboard
    =IFERROR(LOOKUP(99+99,1/(('IT0014'!A2:A5000=B1)*('IT0014'!J2:J5000=M249)*((('IT0014'!F2:F5000=DATE(9999,12,31)))+((DAY('IT0014'!F2:F5000)<=15)+((DAY('IT0014'!G2:G5000)<=15))))),'IT0014'!L2:L5000),0)
    If I helped, Don't forget to add reputation (click on the little star ★ at bottom of this post)
    Don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved)

  9. #9
    Registered User
    Join Date
    04-29-2024
    Location
    Saskatchewan Canada
    MS-Off Ver
    365
    Posts
    31

    Re: Find the most recent entry in a table

    @shukla.ankur281190

    This one worked better in my live workbook Thank you
    Last edited by AliGW; 11-05-2024 at 10:42 AM. Reason: Please don't quote unnecessarily - use the Quick Reply button instead. Please review the forum guidelines.

  10. #10
    Forum Contributor
    Join Date
    11-01-2024
    Location
    Korea
    MS-Off Ver
    M365 64bit v2411
    Posts
    272

    Re: Find the most recent entry in a table

    O247 returns 105, it's 'ChangedOn' is 2024-10-14, not november.
    This formula cannot match month or year

+ 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. Replies: 5
    Last Post: 08-21-2022, 11:28 AM
  2. Searching for the most recent (date) relevant entry in a table of data
    By mlewhe in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-26-2020, 09:13 PM
  3. [SOLVED] find last row entry in table
    By Bax in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-08-2015, 08:34 AM
  4. [SOLVED] SOLVED ** find most recent entry / row that matches user_id
    By master-richie in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-11-2015, 05:00 PM
  5. Excel Table Delete Duplicates Leaving Most Recent Entry
    By BuntyMac in forum Excel General
    Replies: 0
    Last Post: 03-02-2011, 11:10 AM
  6. Show most recent entry
    By desertdude1 in forum Excel General
    Replies: 2
    Last Post: 09-24-2008, 12:45 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