Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 27-May-2007 is a WORKDAY?

I'm using the following formula in local Excel 07 and Excel Web
Services, with the same unexpected results.

=WORKDAY(DATE(2007,5,27),0,holidays)

it returns the following.

27-May-2007

Sunday, May 27, 2007, is a workday? I think not.

It has worked fine, and still does, for a spread of dates before and
after, but just not on this one...any ideas?

-- MM

  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,202
Default 27-May-2007 is a WORKDAY?

I'm using the following formula in local Excel 07 and Excel Web
Services, with the same unexpected results.

=WORKDAY(DATE(2007,5,27),0,holidays)

it returns the following.

27-May-2007

Sunday, May 27, 2007, is a workday? I think not.

It has worked fine, and still does, for a spread of dates before and
after, but just not on this one...any ideas?


It works the same way for May 20, 2007 too. The help files for this function
says...

"Returns a number that represents a date that is the
indicated number of working days before or after
a date (the starting date)."

Isn't the starting date exactly zero working days away from itself?
Basically, specifying zero days offset from a date gives you that date, no?
I mean, you are standing on a certain date and want to know the date will be
if you don't move from it.

Rick

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,501
Default 27-May-2007 is a WORKDAY?

The zero in your formula tells it to find the workday zero days after the
date specified so it is returning the date specified, Try it with a 1 and it
will return the next working day that doesn't appear in the range holiday.

Mike

" wrote:

I'm using the following formula in local Excel 07 and Excel Web
Services, with the same unexpected results.

=WORKDAY(DATE(2007,5,27),0,holidays)

it returns the following.

27-May-2007

Sunday, May 27, 2007, is a workday? I think not.

It has worked fine, and still does, for a spread of dates before and
after, but just not on this one...any ideas?

-- MM


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 698
Default 27-May-2007 is a WORKDAY?

According to your formula you are looking to return the workday that is zero
days before/after the referenced date. In my version of Excel, that formula
always returns the referenced date (ignoring holidays completely).

If you're trying to determine if the referenced date is a holiday or weekend
try these:

=NETWORKDAYS(DATE(2007,5,27),DATE(2007,5,27),holid ays)=1
or
=AND(WEEKDAY(DATE(2007,5,27),2)<6,COUNTIF(holidays ,DATE(2007,5,27))=0)

(In that example, the formulas return FALSE)

Does that help?
***********
Regards,
Ron

XL2002, WinXP


" wrote:

I'm using the following formula in local Excel 07 and Excel Web
Services, with the same unexpected results.

=WORKDAY(DATE(2007,5,27),0,holidays)

it returns the following.

27-May-2007

Sunday, May 27, 2007, is a workday? I think not.

It has worked fine, and still does, for a spread of dates before and
after, but just not on this one...any ideas?

-- MM


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
MM MM is offline
external usenet poster
 
Posts: 1
Default 27-May-2007 is a WORKDAY?

First, thanks for the various bits of advice.

I now understand that throwing the function a days=0 does give
unexpected results (at least to those of us working off the API). So
it pays to perform a check using IF(days=0)... and/or to begin an
increasing series at 1 instead of 0 or negative numbers.

I don't believe this behavior is published anywhere or maybe it's just
me. What gives?

-- MM

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
NETWORKDAYS or WORKDAY Kierano Excel Discussion (Misc queries) 6 January 10th 07 01:20 PM
WORKDAY() and probably more Epinn New Users to Excel 19 September 24th 06 01:19 PM
Workday Function in Excel 2007 Jeff Excel Worksheet Functions 2 July 11th 06 01:02 PM
Workday Help mhart210 Excel Discussion (Misc queries) 3 July 10th 06 03:20 PM
Workday function 4110 Excel Worksheet Functions 0 January 19th 06 03:02 PM


All times are GMT +1. The time now is 03:47 PM.

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"