NETWORKDAYS() saved as =#N/A in XL2007
I've seen a few posts describing this behavior. I don't have a solution for
it but here's an alternative to NETWORKDAYS:
A2 = start date
B2 = end date
C2:C10 = list of holiday dates
If you don't need to exclude holidays:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2)<6))
If you do need to exclude holidays:
=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(A2&":"&B2)),2)<6),--(ISNA(MATCH(ROW(INDIRECT(A2&":"&B2)),C2:C10,0))))
--
Biff
Microsoft Excel MVP
"Sean" wrote in message
...
If I use XL2007 to open an XL2003 file which uses Networkdays() it appears
to
work OK. BUT, when I save the file (as .xls) it corrupts the formulae.
The
worst part is that I get no error message on saving, but the next time I
open
the file with XL2003 or XL2007, I receive the message: "File Error: Data
May
Have Been Lost". If I look at the Networkdays() cells, the numbers
(values)
are still there but where there used to be a Networkdays() function, I now
see "=#N/A"!
This is where it gets weirder. If, when I first open the file in XL2007, I
then save it as .xlsx or .xlsm I can re-open it with XL2007 and the
Networkdays() formulae are still working - Great! Not just that, but if I
save it, from XL2007, as .xls (XL2003 format), I am able to reopen it in
XL2003 or XL2007 and I don't get the aberrant behaviour any more. At least
I
haven't recently (fingers-crossed!).
This has got to be a BUG, but I see no mention of it in the KnowledgeBase
and nobody in the Community seems to have a solution. Any new leads?
Sean
|