View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
dribler2 dribler2 is offline
external usenet poster
 
Posts: 96
Default Workday function linked in an argument of If formula.

Hi Ron,

Just to clarify why i need a workaround on this seemingly endless scenario.
Below is an extract from my CURRENT Help files

WORKDAY
.........."Use WORKDAY to exclude weekends or holidays when you calculate
invoice due dates, expected delivery times, or the number of days of work
performed."

Remarks

* Microsoft Excel stores dates as sequential serial numbers so they can be
used in calculations. By default, January 1, 1900 is serial number 1, and
January 1, 2008 is serial number 39448 because it is 39,448 days after
January 1, 1900. Microsoft Excel for the Macintosh uses a different date
system as its default.
* If any argument is not a valid date, WORKDAY returns the #VALUE! error
value. -------- ***
* If start_date plus days yields an invalid date, WORKDAY returns the #NUM!
error value. ------***
* If days is not an integer, it is truncated.


maybe I have a wrong interpretation.

happy holidays hohoho
dribler2


"dribler2" wrote:


"Ron Rosenfeld" wrote:

On Fri, 22 Dec 2006 18:35:00 -0800, dribler2
wrote:

In A1 a separate sheet will feed in the number of days. (from "no data", or 0
to 31)
in A2 : = if(A1="no data","x",A1)

in B1 a separate sheet will feed in a date.
in B2 : = WORKDAY(B1,A2)
this B2 is used as the end date of a WORKDAY scheduling.

I happen to run the schedule and have not detected the invalid workday
result of B2.
This happens when
A1 = 0
A2 = 0
B1 = a date that falls on sunday or saturday.
B2 = a date that is printed as a sunday or saturday.

Workday function do not govern the needed result.

do anybody encounter this scenario. Or maybe i am just confused

happy holidays hohoho
dribler2


Possibly you are confused.

Regardless of the date in B1, the formula in B2 will give the same date as in
B1. "0" workdays added to a given date will not change the given date.

A2: 0
B1: 23 Dec 2006

B2: =WORKDAY(B1,A2)



--ron


You are right Ron about this confusion, if there is a 0 on a start date of
saturday or sunday, the workday function cannot jump towards the monday,
unlike if the start date is a workday , it can jump all over these 2
non-work days.
I still don't get it how come the WORKDAY function can expose a non-working
day RESULT rather simply giving an error remark.
Is there anyway around this to assure the integrity of the result which is
needed as a Real Workday ?

Meaning, from the sampled scenario, if the start date falls on non-workday,
and the 0 day is added, then the Result will be the date on Monday - the Real
WORKDAY.

Thanks Ron,

happy holidays hohoho
driller2