ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Net workdays error (https://www.excelbanter.com/excel-discussion-misc-queries/207718-net-workdays-error.html)

Dave Shultz

Net workdays error
 
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?


John C[_2_]

Net workdays error
 
Can you tell us what is in the formula bar exactly?
--
** John C **


"Dave Shultz" wrote:

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. Valko

Net workdays error
 
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 ))))

--
Biff
Microsoft Excel MVP


"Dave Shultz" wrote in message
...
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?




Dave Shultz

Net workdays error
 
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?


"John C" wrote:

Can you tell us what is in the formula bar exactly?
--
** John C **


"Dave Shultz" wrote:

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?



All times are GMT +1. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com