+ Reply to Thread
Results 1 to 4 of 4

If a date falls between two week ending days, return the holiday associated with that day.

  1. #1
    Registered User
    Join Date
    02-24-2020
    Location
    Schenectady, NY
    MS-Off Ver
    365
    Posts
    2

    If a date falls between two week ending days, return the holiday associated with that day.

    Hello,

    First, thank you so much for looking at this post and assisting me.

    Secondly, I have an Excel Worksheet where I have a list of Week Ending Dates. On the side, I have a list of Holidays and their dates. I would like to have Excel return which Holiday falls between the Week Ending Dates in the cell next to it.

    Attached is the file.

    Any help would be appreciated. The end goal is to just have an input area for the holidays so I can just change the dates and Excel puts the appropriate Holiday into the corresponding neighboring cell.
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: If a date falls between two week ending days, return the holiday associated with that

    Try this formula in D36, copied down to match your 2020 dates:

    =IFERROR(VLOOKUP(R367,W:X,2,FALSE),IF(COUNTIFS(W:W,">"&R366,W:W,"<"&R367)>0,VLOOKUP(R367,W:X,2,TRUE),""))
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    02-24-2020
    Location
    Schenectady, NY
    MS-Off Ver
    365
    Posts
    2

    Re: If a date falls between two week ending days, return the holiday associated with that

    Bernie,

    Thank you. That did the trick.

    Can you explain the logic behind this formula?

    Thank you again.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: If a date falls between two week ending days, return the holiday associated with that

    If the Sunday date (R367) is in your list (EXACTLY - the False) then return the holiday. If it is not in your list and there is a date in your list within the last week (the COUNTIFS part) then find that date (the TRUE part of the VLOOKUP finds the latest date in a sorted list that is not greater than the date used as the match) and return the holiday associated with the earlier date.

+ 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] Finding number of days between dates and categorising by week ending date
    By benoj2005 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-05-2016, 07:42 AM
  2. [SOLVED] number of days between dates by week ending date
    By benoj2005 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 10-23-2015, 12:19 AM
  3. Excel 2007 : Return Week Ending Date (Friday)
    By cbdunn in forum Excel General
    Replies: 5
    Last Post: 11-26-2014, 07:20 AM
  4. Networkdays with holiday - start date falls on a holiday
    By skexcelforum in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-09-2014, 01:47 AM
  5. Replies: 1
    Last Post: 10-04-2013, 10:04 AM
  6. [SOLVED] Sum 7 days of information based on week ending date
    By tatyanamarie in forum Excel Formulas & Functions
    Replies: 15
    Last Post: 08-18-2013, 07:22 AM
  7. return week-ending date
    By peacelittleone in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-16-2005, 01:38 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