Using IF function and calculation for time in hours and minutes

Anonymous
2022-11-30T22:17:32+00:00

We will be paying out any employees who have over 40 hours of vacation. I cannot seem to get the formula to work. My formula is: =IF(E2>F2,E2-F2,0). As you can see in the screen shot, it works most of the time but there are a few that show up as ####. All of the cells are formatted as [h]:mm. Any ideas?

Microsoft 365 and Office | Excel | For business | 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
{count} votes

6 answers

Sort by: Most helpful
  1. Anonymous
    2022-12-01T16:32:24+00:00

    The first option works beautifully! Thank you so much for your help:)

    0 comments No comments