Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Subtracting Holidays from Calendar Days

Hi All,

I know how to subtract holidays from NETWORKDAYS in a formula by defining
them (as in Christmas Day 25/12/2008), but I have a process that is giving me
a headache. It is measured in calendar days, so at present I am doing a
simple subtraction of start date cell - end date cell of process. However, I
obviously cannot account for any holidays in year. Is there a formula/way of
doing this?

Thanks,

Drew
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default Subtracting Holidays from Calendar Days

Assuming start date = A2, end date = A3, holidays in B2:B50
=A3-A2-COUNTIF(B2:B50,"="&A2)+COUNTIF(B2:B50,""&A3)

Adjust cell references as needed.
--
Best Regards,

Luke M
*Remember to click "yes" if this post helped you!*


"Drewpotlad" wrote:

Hi All,

I know how to subtract holidays from NETWORKDAYS in a formula by defining
them (as in Christmas Day 25/12/2008), but I have a process that is giving me
a headache. It is measured in calendar days, so at present I am doing a
simple subtraction of start date cell - end date cell of process. However, I
obviously cannot account for any holidays in year. Is there a formula/way of
doing this?

Thanks,

Drew

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Subtracting Holidays from Calendar Days

On Wed, 18 Feb 2009 06:05:01 -0800, Drewpotlad
wrote:

Hi All,

I know how to subtract holidays from NETWORKDAYS in a formula by defining
them (as in Christmas Day 25/12/2008), but I have a process that is giving me
a headache. It is measured in calendar days, so at present I am doing a
simple subtraction of start date cell - end date cell of process. However, I
obviously cannot account for any holidays in year. Is there a formula/way of
doing this?

Thanks,

Drew


Not sure exactly what you want.

How does a "calendar day" differ from a "day"?

Do you want to include or exclude weekend days?

What do you mean by "account for any holidays in year"? Do you want to include
or exclude them?
--ron
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Subtracting Holidays from Calendar Days



"Ron Rosenfeld" wrote:

On Wed, 18 Feb 2009 06:05:01 -0800, Drewpotlad
wrote:

Hi All,

I know how to subtract holidays from NETWORKDAYS in a formula by defining
them (as in Christmas Day 25/12/2008), but I have a process that is giving me
a headache. It is measured in calendar days, so at present I am doing a
simple subtraction of start date cell - end date cell of process. However, I
obviously cannot account for any holidays in year. Is there a formula/way of
doing this?

Thanks,

Drew


Not sure exactly what you want.

How does a "calendar day" differ from a "day"?

Do you want to include or exclude weekend days?

What do you mean by "account for any holidays in year"? Do you want to include
or exclude them?
--ron

Hi Ron,

Basically I want to count all days including weekends. What I want to
exclude are all public holidays, such as Christmas/New Years Day and Easter
Holidays (as well as all other British Public Holidays)

Thanks,

Drew
  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 5,651
Default Subtracting Holidays from Calendar Days

On Thu, 19 Feb 2009 02:04:00 -0800, Drewpotlad
wrote:



"Ron Rosenfeld" wrote:

On Wed, 18 Feb 2009 06:05:01 -0800, Drewpotlad
wrote:

Hi All,

I know how to subtract holidays from NETWORKDAYS in a formula by defining
them (as in Christmas Day 25/12/2008), but I have a process that is giving me
a headache. It is measured in calendar days, so at present I am doing a
simple subtraction of start date cell - end date cell of process. However, I
obviously cannot account for any holidays in year. Is there a formula/way of
doing this?

Thanks,

Drew


Not sure exactly what you want.

How does a "calendar day" differ from a "day"?

Do you want to include or exclude weekend days?

What do you mean by "account for any holidays in year"? Do you want to include
or exclude them?
--ron

Hi Ron,

Basically I want to count all days including weekends. What I want to
exclude are all public holidays, such as Christmas/New Years Day and Easter
Holidays (as well as all other British Public Holidays)

Thanks,

Drew


Since you are comparing this to the NETWORKDAYS function, I will make the
assumption that you want an *inclusive* count (i.e. counting both the start and
end dates), which is how the NETWORKDAYS function operates.

That being the case:

Set up a range someplace and NAME it "Holidays" (or use the absolute cell
references, if you prefer).

Then try this formula:

=SUMPRODUCT(--(ISNA(MATCH(ROW(INDIRECT(Start_Date&":"&End_Date)) ,Holidays,0))))

Any date from Start to End will return #NA *unless* it is also found in your
list of holidays. So we just count up the number of NA's.
--ron
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Employee days worked (-Holidays, -weekends, Snow Days, etc) Denise Excel Discussion (Misc queries) 2 December 31st 08 04:37 PM
Add days to a date, but exclude holidays Chickadee Excel Worksheet Functions 13 July 31st 08 04:22 PM
calculating days + holidays gambit Excel Worksheet Functions 6 August 23rd 06 09:19 AM
Generating business days in a calendar month, EXCLUDING holidays jacob Excel Worksheet Functions 1 April 12th 05 05:38 AM
Generating business days in a calendar month, EXCLUDING holidays jacob Excel Worksheet Functions 0 April 12th 05 04:57 AM


All times are GMT +1. The time now is 04:23 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"