ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Finding days between cells C and L where the cells may be empty (https://www.excelbanter.com/excel-worksheet-functions/64065-finding-days-between-cells-c-l-where-cells-may-empty.html)

Jack

Finding days between cells C and L where the cells may be empty
 
Cells C8 and L8 represent entry and exit dates. I used the formula
=(L8-G8)/7 to find the number of weeks between the dates. This works when
there are dates in cells C8 ands L8. However, when the cells do not contain
dates, I get the VALVE error reading in the cell designated to show rthe
number of weeks. How can I modify the formula to address instances when the
cells will be left empty?

Thanks

Bob Phillips

Finding days between cells C and L where the cells may be empty
 
Assuming you want some indication

=IF(OR(C8="",L8=""),"Dates incomplete",(L8-C8)/7)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)

"Jack" wrote in message
...
Cells C8 and L8 represent entry and exit dates. I used the formula
=(L8-G8)/7 to find the number of weeks between the dates. This works when
there are dates in cells C8 ands L8. However, when the cells do not

contain
dates, I get the VALVE error reading in the cell designated to show rthe
number of weeks. How can I modify the formula to address instances when

the
cells will be left empty?

Thanks





All times are GMT +1. The time now is 07:19 AM.

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