Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
You don't need a UDF
First one =IF(AND(NOT(ISNUMBER(MATCH(start_date,holidays,0)) ),WEEKDAY(start_date,2)<numDays),WORKDAY(start_dat e,numDays,holidays),"") Second =IF(OR(ISNUMBER(MATCH(start_date,holidays,0)),WEEK DAY(start_date,1)=1),"", start_date+SIGN(numDays)*SMALL(IF((WEEKDAY(start_d ate+SIGN(numDays)*(ROW(INDIRECT("1:"&ABS(numDays)* 10))),2)<7)* ISNA(MATCH(start_date+SIGN(numDays)*(ROW(INDIRECT( "1:"&ABS(numDays)*10))),holidays,0)),ROW(INDIRECT( "1:"&ABS(numDays)*10))),ABS(numDays))) which is an array formula -- --- HTH Bob (change the xxxx to gmail if mailing direct) "dribler2" wrote in message ... Hello, can anybody help me to build a user defined function "myWORKDAY" typical with excel's built-in function =WORKDAY(start_date,days,holidays) but the UDF must refuse to call a start_date if it is within the holidays or non-workday(s). also, to allow me make some adjustments on my scheduling criteria. e.g. UDF#1 name "my5WORKDAY" for a Regular Monday to Friday work schedule UDF#2 name "my6WORKDAY" for a extended Monday to Saturday work schedule. I believe that this forum have come for a long way of getting task be solved easily... more power dribler |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Bob,
is this possible or not ? please advice.. happy holidays "Bob Phillips" wrote: You don't need a UDF First one =IF(AND(NOT(ISNUMBER(MATCH(start_date,holidays,0)) ),WEEKDAY(start_date,2)<numDays),WORKDAY(start_dat e,numDays,holidays),"") Second =IF(OR(ISNUMBER(MATCH(start_date,holidays,0)),WEEK DAY(start_date,1)=1),"", start_date+SIGN(numDays)*SMALL(IF((WEEKDAY(start_d ate+SIGN(numDays)*(ROW(INDIRECT("1:"&ABS(numDays)* 10))),2)<7)* ISNA(MATCH(start_date+SIGN(numDays)*(ROW(INDIRECT( "1:"&ABS(numDays)*10))),holidays,0)),ROW(INDIRECT( "1:"&ABS(numDays)*10))),ABS(numDays))) which is an array formula -- --- HTH Bob (change the xxxx to gmail if mailing direct) "dribler2" wrote in message ... Hello, can anybody help me to build a user defined function "myWORKDAY" typical with excel's built-in function =WORKDAY(start_date,days,holidays) but the UDF must refuse to call a start_date if it is within the holidays or non-workday(s). also, to allow me make some adjustments on my scheduling criteria. e.g. UDF#1 name "my5WORKDAY" for a Regular Monday to Friday work schedule UDF#2 name "my6WORKDAY" for a extended Monday to Saturday work schedule. I believe that this forum have come for a long way of getting task be solved easily... more power dribler |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
thanks Bob,
Wow, it works well on the 5 day and 7 day WORKDAY Yet the 6 day, incsat seems giving me an extra result of one day. i tried the 3 formula for the same data start date: 02/12/2006 days: 33 Holidays : 25/12/2006, 1/01/2007 the results a 5 workday: 20/01/2007 : perfect ! 7 workday:06/01/2007 : perfect ! 6 workday: 13/01/2007 : should have been 12/01/2007 hope we can resolve this as a helpful post with a clear check mark.. regards driller |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|