Net workdays error

D

Dave Shultz

When I open up my workbook I get an error that data has been lost. I have
isolated this to a worksheet where I have this formula.

=NETWORKDAYS(L5,M5,$K$20:$K$24)

The cell has the # of net workdays listed but when I click on the cell and
check the formula bar, "#NA" is in the formula bar and not the formula I
listed above.

I correct this and save the book and it seems to be OK for awhile and then
suddenly I get the lost data error again when opening the work book. Any
suggestions?
 
T

T. Valko

Try replacing your NETWORKDAYS formula with this formula:

=SUMPRODUCT(--(WEEKDAY(ROW(INDIRECT(L5&":"&M5)),2)<6),--(ISNA(MATCH(ROW(INDIRECT(L5&":"&M5)),$K$20:$K$24,0))))
 
D

Dave Shultz

Sorry for the slow response, John. I've been waiting for the error to occur
again which it just did after Excel 2007 crashed on me (Excel often crashes
if I'm working on too many workbooks at once). After opening the file, I'm
prompted with this message: File error: data may have been lost.

To answer your question, the formula that should be used is:
=NETWORKDAYS(L5,M5,$K$20:$K$24)

However, “=#N/A†is in the formula bar.

Should I use the solution suggested by T. Valko?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top