Time is measured as a fraction of a day. If you keep the
hh:mm or hh:mm:ss formatting you can calculated with time, but
Excel will not format negative times. If you have a total where
hours may reach or exceed 24 hours you want to format as
[hh]:mm to keep the hours from rolling off into days.
If you want to use time in a calculation that uses hours then you must
multiply the time by 24 for hours worked.
For more information on Dates and Times, and how to measure
time worked through midnight see these pages.
http://www.mvps.org/dmcritchie/excel/datetime.htm
http://www.cpearson.com/excel/datetime.htm
i;e.
B2: 22:50
C2: 03:50
D2: =C2-B2+(B2<C2)