Adding and Subtracting TIME with more than two values
Hi there,
I want to calculate working time and travel time. Therefore, I've set um a NUMBERS spreadsheet with
Column A = Time leaving the house
Column B = Time arriving at work = Start of working time
Column C = End of working time = Time leaving work place
Column D = Time arriving back home
Column E = Break (or other non-working time)
to give a concrete numeric example lets assume the following dates (time format is hh:mm):
Column A: 8:00
Column B: 8:45
Column C: 18:00
Column D: 18:30
Column E: 00:45
Now I want to calculate the pure working time in Column F. I tried to do so by using the formula
=Column C - Column B - Column E (i.e. finishing work - starting work - break = net working time)
Column G is supposed to return the pure travel time. I tried this formula
=(Column D - Column C) + (Column B - Column A) (i.e. (arriving at home - leaving work place) + (arriving at workplace - leaving the house) so simply the two drives to and from work summed up)
However, in both columns I receive error messages. The messages saying "the operator "-" can not subtract a date from a number". But all my cells are formatted as dates. No number is involved and all cells used to calculate columns F and G use "pure" entries, so do not use cells which content calculated values.
Column H is supposed to subtract one hour from traval time. I'd expect to be able to simply use Column G and deduct one hour approximately like that:
=Column G - 01:00 but since I have already the error message in Column G, there is no chance to test this.
Finally Column I should return values after using comparison operators such as in the following
=if(Column F < 05:00, "nothing", if(Column F < 08:00, 6, 12))
so if net working time is less than 5 hours "nothing" should be returned in Column I. If net working time is between 8 and 5 hours the value 6 should be returned. And for all net working times longer than 8 hours the value 12 is supposed to display.
But also here, I have no chance to test because the initial error in Column F.
Sorry for the long description. I hope the clarity of the problem makes it worth, though. Would be more than happy to get any help on this, and insights about how to deal better with time calculations.
Thanks a lot.
mbp 13", Mac OS X (10.6.3)