Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Workdays not working as expected

Help!
(running Office 2003 on XP)

I am trying to calculate 11 workdays from a given date. Some holidays we
work, some we don't. We shut down for up to two weeks at Christmas.
I put in the workday formula as I think it to be. The result isn't what I
expected.

Lets say I put the date to start in cell A1, for example 1/5/09
In cell B1 I insert the following =workday(a1,11,0)
The result displayed 1/20/09
so, I stuck in an extra holiday or two =workday(a1,11,1) displays 1/20/09.
=workday(a1,11,2) displays 1/20/09. =workday(a1,11,10) displays 1/20/09.
=workday(a1,11) displays 1/20/09.

Where am I going wrong?

Changing the



--

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Workdays not working as expected

The holidays argument should be a reference to a range where you list the
actual dates for the holidays.

Lets assume 1/1/2009 and 1/2/2009 are holidays. List those dates in a range
of cells:

J1 = 1/1/2009
J2 = 1/2/2009

Then you refer to that range like this:

=WORKDAY(A1,11,J1:J2)


--
Biff
Microsoft Excel MVP


"Rotata" wrote in message
...
Help!
(running Office 2003 on XP)

I am trying to calculate 11 workdays from a given date. Some holidays we
work, some we don't. We shut down for up to two weeks at Christmas.
I put in the workday formula as I think it to be. The result isn't what I
expected.

Lets say I put the date to start in cell A1, for example 1/5/09
In cell B1 I insert the following =workday(a1,11,0)
The result displayed 1/20/09
so, I stuck in an extra holiday or two =workday(a1,11,1) displays 1/20/09.
=workday(a1,11,2) displays 1/20/09. =workday(a1,11,10) displays 1/20/09.
=workday(a1,11) displays 1/20/09.

Where am I going wrong?

Changing the



--



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8
Default Workdays not working as expected

Thank you much for the example. Not only does it work beautifully, I now have
a better understanding of "range".



--


"T. Valko" wrote:

The holidays argument should be a reference to a range where you list the
actual dates for the holidays.

Lets assume 1/1/2009 and 1/2/2009 are holidays. List those dates in a range
of cells:

J1 = 1/1/2009
J2 = 1/2/2009

Then you refer to that range like this:

=WORKDAY(A1,11,J1:J2)


--
Biff
Microsoft Excel MVP


"Rotata" wrote in message
...
Help!
(running Office 2003 on XP)

I am trying to calculate 11 workdays from a given date. Some holidays we
work, some we don't. We shut down for up to two weeks at Christmas.
I put in the workday formula as I think it to be. The result isn't what I
expected.

Lets say I put the date to start in cell A1, for example 1/5/09
In cell B1 I insert the following =workday(a1,11,0)
The result displayed 1/20/09
so, I stuck in an extra holiday or two =workday(a1,11,1) displays 1/20/09.
=workday(a1,11,2) displays 1/20/09. =workday(a1,11,10) displays 1/20/09.
=workday(a1,11) displays 1/20/09.

Where am I going wrong?

Changing the



--




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 15,768
Default Workdays not working as expected

You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Rotata" wrote in message
...
Thank you much for the example. Not only does it work beautifully, I now
have
a better understanding of "range".



--


"T. Valko" wrote:

The holidays argument should be a reference to a range where you list the
actual dates for the holidays.

Lets assume 1/1/2009 and 1/2/2009 are holidays. List those dates in a
range
of cells:

J1 = 1/1/2009
J2 = 1/2/2009

Then you refer to that range like this:

=WORKDAY(A1,11,J1:J2)


--
Biff
Microsoft Excel MVP


"Rotata" wrote in message
...
Help!
(running Office 2003 on XP)

I am trying to calculate 11 workdays from a given date. Some holidays
we
work, some we don't. We shut down for up to two weeks at Christmas.
I put in the workday formula as I think it to be. The result isn't what
I
expected.

Lets say I put the date to start in cell A1, for example 1/5/09
In cell B1 I insert the following =workday(a1,11,0)
The result displayed 1/20/09
so, I stuck in an extra holiday or two =workday(a1,11,1) displays
1/20/09.
=workday(a1,11,2) displays 1/20/09. =workday(a1,11,10) displays
1/20/09.
=workday(a1,11) displays 1/20/09.

Where am I going wrong?

Changing the



--






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 8,651
Default Workdays not working as expected

For any Excel function (except DATEDIF) on which you need extra information,
you should always start by looking at the Excel help for that function. It
will explain the syntax, give examples, and often have a "See also" link to
related functions.
--
David Biddulph

"Rotata" wrote in message
...
Thank you much for the example. Not only does it work beautifully, I now
have
a better understanding of "range".


"T. Valko" wrote:

The holidays argument should be a reference to a range where you list the
actual dates for the holidays.

Lets assume 1/1/2009 and 1/2/2009 are holidays. List those dates in a
range
of cells:

J1 = 1/1/2009
J2 = 1/2/2009

Then you refer to that range like this:

=WORKDAY(A1,11,J1:J2)

....


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
Code not working as expected. Ayo Excel Discussion (Misc queries) 2 May 19th 08 07:08 PM
Help !!! My code is not working as expected. Ayo Excel Discussion (Misc queries) 3 August 30th 07 10:39 PM
Iserror not working as expected NathanG Excel Worksheet Functions 5 February 1st 07 05:31 PM
=NETWORKDAYS not working as expected and as it once did USAOz Excel Worksheet Functions 2 July 13th 06 03:02 PM
Lookup Not working as expected trumpy81 New Users to Excel 5 June 30th 05 07:41 PM


All times are GMT +1. The time now is 07:28 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"