ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   formula (https://www.excelbanter.com/excel-worksheet-functions/88805-formula.html)

chedd via OfficeKB.com

formula
 
I am adding two cells togetgher that contains dates to find the number of
actual days between them. The formula i am using is =I21-H21+1 quiet simple,
but on the empty cells i have default fig of 1 showing. Is there any way i
can remove this for a zero fig.

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200605/1

Pete_UK

formula
 
Try this:

=IF(OR(I21="",H21=""),0,I21-H21+1)

If either I21 or H21 (or both) are blank, then return a zero, otherwise
your formula.

Hope this helps.

Pete


chedd via OfficeKB.com

formula
 
Pete_UK wrote:
Try this:

=IF(OR(I21="",H21=""),0,I21-H21+1)

If either I21 or H21 (or both) are blank, then return a zero, otherwise
your formula.

Hope this helps.

Pete

Thank you for this and it worked well. Again thanks

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...tions/200605/1

Pete_UK

formula
 
Thanks for feeding back - glad it worked for you.

Pete



All times are GMT +1. The time now is 06:47 AM.

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