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 |