Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9008899
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:03:27+00:00 2026-06-16T02:03:27+00:00

I have a datasheet that contains a list of start and end dates for

  • 0

I have a datasheet that contains a list of start and end dates for a task. I need to calculate how many days between the start date and end date are part of our Christmas break (11th December to 7th January)

So for example,when start date is 10/12/2012 and end date is 12/01/2013, 28 of the days are between those dates. when the start date is 15/12/2012 and the end date is 12/03/2013, then 22 days of days are between those dates. If the start date is 10/12/2012 and the end date is 12/01/2014, 56 of the days are between those dates (because there’s two years of the range).

I need to do this with a formula because of the requirements that I’ve been set.
Initially I decided to use the number of times Christmas Day (25th December) occurs and just calculate 4 weeks per occurrence.

The formula I used was

=FLOOR((E12-A25)/365,1)+IF(OR(MONTH(E12)=12,
       MONTH(A25)=12),
       IF(AND(DAY(A25)<=25,DAY(E12)>=25),1,0),
       IF(OR(MONTH(A25)>=12,
       IF(MONTH(E12)<MONTH(A25),
          MONTH(E12)+12,
          MONTH(E12))>=12),1,0))*28

But obviously this doesn’t help if the range start and end date falls between those two dates.

Any suggestions? I’m at a dead end

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T02:03:28+00:00Added an answer on June 16, 2026 at 2:03 am

    Your date math on the second example is wrong — there are 24 days in that range, not 22.

    I can get you there for one holiday period:

    LET:

    • A1 contain the holiday start (11-Dec-2012)
    • A2 contain the holiday end (7-Jan-2013)
    • B1 contain the start date
    • B2 contain the end date

    FORMULA:

    =MAX(MIN(A2+1,B2+1),A1) - MIN(MAX(A1,B1),A2+1)
    

    The formula basically finds the overlapping date range, if there is one, and subtracts to get the number of whole days. The “+1” is because your “end dates” are actually inclusive, so for date math you need to have the holiday ending on 8 Jan, not 7 Jan, to capture that last day.

    But this only works for a single year’s holiday. You could store holiday ranges in other cells and use the same formula and add them all up, but you’ll be limited to however many years you set up.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a dataset that contains caller, callee fiels and i need some LINQ
I have a dataset that contains: Table { date itemName } The date for
I have a list that uses a Hyperlink column (which contains the URL and
I have a dataset (Purchase.df) that contains many columns and rows. The important variable
I have a dataframe that contains GDP values by country with an accompanying date
I have a sub form that looks like a datasheet view. It returns prices
i have the following linq query that create a left join between two tables:
I have a list of datasets. Each dataset contains one month of some data.
I currently have a Richfaces dataTable bound to a backing bean that contains all
I have the following query that returns exactly what I need, var dataRows =

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.