ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Need to revise formula (https://www.excelbanter.com/excel-worksheet-functions/64246-need-revise-formula.html)

Jack

Need to revise formula
 
In a chart where columns G and L are used to record the entry and exit dates,
column S reflects the number of weeks (difference). I used the formula
=(L-G)/7. This formula works when dates are entered in columns G and L.
However, if either cell is empty, I get the "value" error message. How can I
revise the formula that produces a 0 if columns G and L arte empty?

Thanks

Roland

Need to revise formula
 
=IF(AND(L5=0,G5=0),0,(L5-G5)/7)


"Jack" wrote:

In a chart where columns G and L are used to record the entry and exit dates,
column S reflects the number of weeks (difference). I used the formula
=(L-G)/7. This formula works when dates are entered in columns G and L.
However, if either cell is empty, I get the "value" error message. How can I
revise the formula that produces a 0 if columns G and L arte empty?

Thanks



All times are GMT +1. The time now is 11:13 AM.

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