formula

  • Thread starter chedd via OfficeKB.com
  • Start date
C

chedd via OfficeKB.com

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

Pete_UK

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
 
C

chedd via OfficeKB.com

Pete_UK said:
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
 
Top