Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default In WORKDAY function, how to exclude multiple/variable holiday rang

In the following formula, G21 contains a date, H21 contains the number of
days that the function should add on to that date, and M20:M100 contains a
list of dates to exclude from the calculation:

=WORKDAY(G21,H21,M20:M100)

This works fine. The problem is that this is for a schedule form that will
be used for many different projects, from vendors scattered worldwide. The
vendors all have different holiday schedules. Currently, the list in M shows
ALL of those holidays, but really, they're scattered across our company and
all of the vendors, who are identified in Column L, like in this example:

COLUMN L COLUMN M
Our office Date
Our office Date
Our office Date
Vendor X Date
Vendor X Date
Vendor X Date
Vendor Y Date
Vendor Y Date
Vendor Z Date

What I'd like to do is make the schedule form more selective, so that if a
certain vendor is involved on a project, only their holidays are added to
those of our office (which are constant). I already have a column (Column F)
where the user identifies the vendor. I guess my question is this: can the
formula be rewritten so that it reads the vendor entered in Column F (for
this example, say cell F21), and then calculate the workdays with only the
holidays for our office and that particular vendor (say, Vendor Y) excluded?

It kind of seems like I should be able to embed the holiday argument in the
WORKDAY function with with a VLOOKUP or INDEX function of some sort, but I
can't figure it out--I keep runningup against the issue of trying to coax a
single range for the WORKDAY holdiday exclusion from a noncontiguous range.

The "Our office" holidays always appear at the top of the list and should
always be excluded. It's only the vendor-specific holidays that will be
variable. It guess a way of restating all of this is to say that the WORKDAY
formula ALWAYS needs to exclude the "Our office" holidays in Column M, but
needs to also exclude those of one vendor (identified in Column F) in the
same list.

I hope this makes sense. To further complicate things, I can't resort to
VBA, because some users are on Macs, Office 2007 for mac doesn't support
macros. If anyone can help, I'd really appreciate it.



  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,722
Default In WORKDAY function, how to exclude multiple/variable holiday rang

As you found out, you have to have a contiguous range. However, we can use an
array IF function to change holidays that you don't want to include to 0
(which evaluates to a date of 1/0/1900)

=WORKDAY(G21,H21,--IF((L20:L100=F21)+(L20:L100="Our office"),M20:M100))

Input this as an array formula by using Ctrl+Shift+Enter to confirm formula,
not just Enter. The nice thing about this formula is that it doesn't require
the vendor names to be sorted and/or grouped.

--
Best Regards,

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


"Harold Shea" wrote:

In the following formula, G21 contains a date, H21 contains the number of
days that the function should add on to that date, and M20:M100 contains a
list of dates to exclude from the calculation:

=WORKDAY(G21,H21,M20:M100)

This works fine. The problem is that this is for a schedule form that will
be used for many different projects, from vendors scattered worldwide. The
vendors all have different holiday schedules. Currently, the list in M shows
ALL of those holidays, but really, they're scattered across our company and
all of the vendors, who are identified in Column L, like in this example:

COLUMN L COLUMN M
Our office Date
Our office Date
Our office Date
Vendor X Date
Vendor X Date
Vendor X Date
Vendor Y Date
Vendor Y Date
Vendor Z Date

What I'd like to do is make the schedule form more selective, so that if a
certain vendor is involved on a project, only their holidays are added to
those of our office (which are constant). I already have a column (Column F)
where the user identifies the vendor. I guess my question is this: can the
formula be rewritten so that it reads the vendor entered in Column F (for
this example, say cell F21), and then calculate the workdays with only the
holidays for our office and that particular vendor (say, Vendor Y) excluded?

It kind of seems like I should be able to embed the holiday argument in the
WORKDAY function with with a VLOOKUP or INDEX function of some sort, but I
can't figure it out--I keep runningup against the issue of trying to coax a
single range for the WORKDAY holdiday exclusion from a noncontiguous range.

The "Our office" holidays always appear at the top of the list and should
always be excluded. It's only the vendor-specific holidays that will be
variable. It guess a way of restating all of this is to say that the WORKDAY
formula ALWAYS needs to exclude the "Our office" holidays in Column M, but
needs to also exclude those of one vendor (identified in Column F) in the
same list.

I hope this makes sense. To further complicate things, I can't resort to
VBA, because some users are on Macs, Office 2007 for mac doesn't support
macros. If anyone can help, I'd really appreciate it.



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default In WORKDAY function, how to exclude multiple/variable holiday

This works WONDERFULLY! Thank you so much for the fast and creative solution!
I honestly do not believe I would ever have thought of this. You've made
today much, much better!


"Luke M" wrote:

As you found out, you have to have a contiguous range. However, we can use an
array IF function to change holidays that you don't want to include to 0
(which evaluates to a date of 1/0/1900)

=WORKDAY(G21,H21,--IF((L20:L100=F21)+(L20:L100="Our office"),M20:M100))

Input this as an array formula by using Ctrl+Shift+Enter to confirm formula,
not just Enter. The nice thing about this formula is that it doesn't require
the vendor names to be sorted and/or grouped.

--
Best Regards,

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


"Harold Shea" wrote:

In the following formula, G21 contains a date, H21 contains the number of
days that the function should add on to that date, and M20:M100 contains a
list of dates to exclude from the calculation:

=WORKDAY(G21,H21,M20:M100)

This works fine. The problem is that this is for a schedule form that will
be used for many different projects, from vendors scattered worldwide. The
vendors all have different holiday schedules. Currently, the list in M shows
ALL of those holidays, but really, they're scattered across our company and
all of the vendors, who are identified in Column L, like in this example:

COLUMN L COLUMN M
Our office Date
Our office Date
Our office Date
Vendor X Date
Vendor X Date
Vendor X Date
Vendor Y Date
Vendor Y Date
Vendor Z Date

What I'd like to do is make the schedule form more selective, so that if a
certain vendor is involved on a project, only their holidays are added to
those of our office (which are constant). I already have a column (Column F)
where the user identifies the vendor. I guess my question is this: can the
formula be rewritten so that it reads the vendor entered in Column F (for
this example, say cell F21), and then calculate the workdays with only the
holidays for our office and that particular vendor (say, Vendor Y) excluded?

It kind of seems like I should be able to embed the holiday argument in the
WORKDAY function with with a VLOOKUP or INDEX function of some sort, but I
can't figure it out--I keep runningup against the issue of trying to coax a
single range for the WORKDAY holdiday exclusion from a noncontiguous range.

The "Our office" holidays always appear at the top of the list and should
always be excluded. It's only the vendor-specific holidays that will be
variable. It guess a way of restating all of this is to say that the WORKDAY
formula ALWAYS needs to exclude the "Our office" holidays in Column M, but
needs to also exclude those of one vendor (identified in Column F) in the
same list.

I hope this makes sense. To further complicate things, I can't resort to
VBA, because some users are on Macs, Office 2007 for mac doesn't support
macros. If anyone can help, I'd really appreciate it.



  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 846
Default In WORKDAY function, how to exclude multiple/variable holiday rang

Luke has a good solution - another solution is to have an if statment for
your dates. =If(Group="Our Office",date,0)

Where Group is a range name for a specific cell.

This would also work


"Harold Shea" wrote:

In the following formula, G21 contains a date, H21 contains the number of
days that the function should add on to that date, and M20:M100 contains a
list of dates to exclude from the calculation:

=WORKDAY(G21,H21,M20:M100)

This works fine. The problem is that this is for a schedule form that will
be used for many different projects, from vendors scattered worldwide. The
vendors all have different holiday schedules. Currently, the list in M shows
ALL of those holidays, but really, they're scattered across our company and
all of the vendors, who are identified in Column L, like in this example:

COLUMN L COLUMN M
Our office Date
Our office Date
Our office Date
Vendor X Date
Vendor X Date
Vendor X Date
Vendor Y Date
Vendor Y Date
Vendor Z Date

What I'd like to do is make the schedule form more selective, so that if a
certain vendor is involved on a project, only their holidays are added to
those of our office (which are constant). I already have a column (Column F)
where the user identifies the vendor. I guess my question is this: can the
formula be rewritten so that it reads the vendor entered in Column F (for
this example, say cell F21), and then calculate the workdays with only the
holidays for our office and that particular vendor (say, Vendor Y) excluded?

It kind of seems like I should be able to embed the holiday argument in the
WORKDAY function with with a VLOOKUP or INDEX function of some sort, but I
can't figure it out--I keep runningup against the issue of trying to coax a
single range for the WORKDAY holdiday exclusion from a noncontiguous range.

The "Our office" holidays always appear at the top of the list and should
always be excluded. It's only the vendor-specific holidays that will be
variable. It guess a way of restating all of this is to say that the WORKDAY
formula ALWAYS needs to exclude the "Our office" holidays in Column M, but
needs to also exclude those of one vendor (identified in Column F) in the
same list.

I hope this makes sense. To further complicate things, I can't resort to
VBA, because some users are on Macs, Office 2007 for mac doesn't support
macros. If anyone can help, I'd really appreciate it.



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default In WORKDAY function, how to exclude multiple/variable holiday

Brad: Thanks for the alternative solution. Luke's ended up worked pretty
well, so I'll probably keep this idea on file for another day, but I really
appreciate the help. Thanks again!

"Brad" wrote:

Luke has a good solution - another solution is to have an if statment for
your dates. =If(Group="Our Office",date,0)

Where Group is a range name for a specific cell.

This would also work


"Harold Shea" wrote:

In the following formula, G21 contains a date, H21 contains the number of
days that the function should add on to that date, and M20:M100 contains a
list of dates to exclude from the calculation:

=WORKDAY(G21,H21,M20:M100)

This works fine. The problem is that this is for a schedule form that will
be used for many different projects, from vendors scattered worldwide. The
vendors all have different holiday schedules. Currently, the list in M shows
ALL of those holidays, but really, they're scattered across our company and
all of the vendors, who are identified in Column L, like in this example:

COLUMN L COLUMN M
Our office Date
Our office Date
Our office Date
Vendor X Date
Vendor X Date
Vendor X Date
Vendor Y Date
Vendor Y Date
Vendor Z Date

What I'd like to do is make the schedule form more selective, so that if a
certain vendor is involved on a project, only their holidays are added to
those of our office (which are constant). I already have a column (Column F)
where the user identifies the vendor. I guess my question is this: can the
formula be rewritten so that it reads the vendor entered in Column F (for
this example, say cell F21), and then calculate the workdays with only the
holidays for our office and that particular vendor (say, Vendor Y) excluded?

It kind of seems like I should be able to embed the holiday argument in the
WORKDAY function with with a VLOOKUP or INDEX function of some sort, but I
can't figure it out--I keep runningup against the issue of trying to coax a
single range for the WORKDAY holdiday exclusion from a noncontiguous range.

The "Our office" holidays always appear at the top of the list and should
always be excluded. It's only the vendor-specific holidays that will be
variable. It guess a way of restating all of this is to say that the WORKDAY
formula ALWAYS needs to exclude the "Our office" holidays in Column M, but
needs to also exclude those of one vendor (identified in Column F) in the
same list.

I hope this makes sense. To further complicate things, I can't resort to
VBA, because some users are on Macs, Office 2007 for mac doesn't support
macros. If anyone can help, I'd really appreciate it.





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
Alternative formula to exclude holiday calculation Cam Excel Worksheet Functions 6 January 15th 09 03:39 AM
How do i remove the auto date function from a cell to allow # rang SKJ18 Excel Discussion (Misc queries) 2 January 8th 08 09:26 AM
Help for multiple & variable validation function Montu Excel Worksheet Functions 1 December 20th 07 07:26 AM
Include/Exclude Holiday from Automatic Sheet Creation David Excel Discussion (Misc queries) 0 August 27th 06 04:51 PM
Holiday Planner show holiday taken? Mac5 Excel Worksheet Functions 0 July 18th 06 11:29 PM


All times are GMT +1. The time now is 07:29 PM.

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

About Us

"It's about Microsoft Excel"