+ Reply to Thread
Results 1 to 7 of 7

Lookup based on a date

  1. #1
    Registered User
    Join Date
    11-16-2015
    Location
    Cheshire
    MS-Off Ver
    Microsoft 365
    Posts
    8

    Lookup based on a date

    Hi ll,

    I am looking to find a solution to returning a value from a sheet based on a date.
    Sample sheet attached but basically, I am trying to use the date on the "Calcs" sheet to check if the date falls in the month date on the "Data" sheet and return the £ value if so?

    Any thoughts

    The sample sheet explains it more.

    Any help greatfully received.
    Attached Files Attached Files

  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 2403
    Posts
    44,053

    Re: Lookup based on a date

    One way:

    =INDEX(Data!2:2,MATCH(EOMONTH(Calcs!D3,-1)+1,Data!1:1,0))
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,882

    Re: Lookup based on a date

    =HLOOKUP(DATE(YEAR(D3),MONTH(D3),1),Data!$A$1:$G$2,2,FALSE)
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  4. #4
    Forum Expert Sam Capricci's Avatar
    Join Date
    06-14-2012
    Location
    Palm Harbor, Florida
    MS-Off Ver
    16.84 for Mac MS 365
    Posts
    8,499

    Re: Lookup based on a date

    this hlookup looks like it would work for you... =HLOOKUP(D3,Data!A1:G2,2,TRUE)
    Make contributors happy, click on the "* Add Reputation" as a way to say thank you.
    Sam Capricci

  5. #5
    Forum Expert
    Join Date
    09-25-2015
    Location
    Milan Italy
    MS-Off Ver
    office 365
    Posts
    1,781

    Re: Lookup based on a date

    Calcs

    D4=FILTER(Data!A2:G2,(MONTH(Data!A1:G1)=MONTH(Calcs!D3))*(YEAR(Data!A1:G1)=YEAR(Calcs!D3)),"no data")

  6. #6
    Registered User
    Join Date
    11-16-2015
    Location
    Cheshire
    MS-Off Ver
    Microsoft 365
    Posts
    8

    Re: Lookup based on a date

    Many Thanks Glenn
    I prefer the index math method.

    Many good and alternative responses though. Thanks to everyone.

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

    Re: Lookup based on a date

    You're welcome.



    It would be very nice if you were to just click the Add Reputation button at the foot of any of the posts of members who helped you reach a solution.

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

+ 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. [SOLVED] Lookup based on date and name
    By nickpavlov in forum Excel General
    Replies: 2
    Last Post: 03-30-2021, 06:17 PM
  2. Lookup value based on closest date either side of a date
    By RollingStone88 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-10-2019, 08:38 AM
  3. [SOLVED] Formula to lookup Date based on Date in cell D1
    By rizmomin in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 11-23-2014, 05:36 PM
  4. [SOLVED] Formula to Lookup value based on date within a date range
    By MHamid in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 11-26-2013, 02:24 PM
  5. [SOLVED] Lookup date and condtional format colour based on date
    By Smudge.Smith in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 10-25-2013, 08:38 AM
  6. Replies: 2
    Last Post: 09-20-2010, 02:51 PM
  7. Lookup based on a date
    By mkvassh in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-21-2009, 04:03 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