Asdfg
Asdfg

Reputation: 12203

Subtract two times of day to get interval length in hours

I am working on creating Time sheet in excel and i have the format like this.

 A            B        C         D          E      F
Date         Day    Time IN    Time OUT   Lunch   Total
8/29/2011    Monday   9.00       18.00     0.45    8.55

I am not able to get correct hours in Total field. Correct value should have been 8.15 and not 8.55.

This is the current formula i am using in to calculate Total.

=D2-C2-E2

Can someone please help me get the formula right?

Upvotes: 0

Views: 3148

Answers (1)

Instead of typing e.g. 9.00 in your cells, type 9:00 (and format your cells as time to make sure they display correctly).

The formula itself is fine, but currently you're just subtracting decimal numbers, and of course the correct result is 8.55.

Upvotes: 3

Related Questions