Thread: Adding times
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Pete_UK Pete_UK is offline
external usenet poster
 
Posts: 8,856
Default Adding times

Try this:

=IF(OR(I="",J=""),0,IF(J<I,J+1-I,J-I))

Obviously, I and J need to be cell references (unless they are named
ranges).

Hope this helps.

Pete

"MBC" wrote in message
...
I am using the following formula to add times (24 hour) in MS Excel 2003
=IF(J<I,J+1-I,J-I) . I is my start time J is my finish time. The formula
works ok when a start and finish time are entered but if ONLY a start time
or
finish time are entered the "total hours" cell is populated with incorrect
data. Is there any way I can say"if either I or J are empty then "total
Hours
= 0