LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,726
Default help for myWORKDAY UDF

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



 
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



All times are GMT +1. The time now is 07:48 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"