View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
vezerid
 
Posts: n/a
Default Auto update daily report problem

Steve,

Glad to know it is working. I am addressing your musing if there could
be a more efficient way.

It seems to me you want to produce the valid working dates in column
A:A. Your formula seems to suspect you might get an error using workday
(why? - I don't see a plausible reason) and then produce a sequence of
workdays IF it is April. My guess here is that you are supplying the
number every month to exclude days of the next month. If so, your test
could be

=IF(ISERROR(workday(A1,1,$J$5)),"",IF(MONTH(workda y(A1,1))<MONTH($A$1),"",workday(A1*,1,$J$5)))


Regarding your CHOOSE(), and not knowing your exact intentions, I can
suggest the following:

1. You can use VLOOKUP() inside the OFFSET function

=OFFSET(Sheet2!A1,0,VLOOKUP(TODAY(),A2:B24,2,FALSE ))

2. You can avoid the tabulation/vlookup function altogether using the
inverse function of WORKDAY, which is NETWORKDAYS. Thus you could have
something like

=OFFSET(Sheet2!A1,0,NETWORKDAYS(Sheet2!A1,TODAY(), $J$5))

But whether you choose either depends on your needs.

Regards

Kostis