Share via

=DATEDIF & ISBLANK TOGETHER

Anonymous
2018-01-25T19:37:54+00:00

I am trying to correct this formula =DATEDIF(H80,J80,"D")ISBLANK,0)) , where H80 is the start_date, J80 is the end_date, "D" gives me the number of days in between  but if one cell is blank to return "0" instead ( example "-43560") any ideas how to correct this?

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Vijay A. Verma 104.8K Reputation points Volunteer Moderator
2018-01-25T19:39:01+00:00

Use the below formula to show 0 in case one of the cells is blank

=IF(OR(H80="",J80=""),0,DATEDIF(H80,J80,"D"))

Was this answer helpful?

20+ people found this answer helpful.
0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Anonymous
    2018-01-25T19:49:17+00:00

    Thank you very much that corrected the issue perfectly.

    Was this answer helpful?

    2 people found this answer helpful.
    0 comments No comments