Thread: time formula
View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.misc
SteveW SteveW is offline
external usenet poster
 
Posts: 427
Default time formula

It's a trick.
(B1<A1) will either be True or False, its a boolean test
True or False will give 1 or 0, then *24 means that it effectively adds 24
hours
if B1 is less than A1

When starting with Excel stick to the IF() format if you aren't sure

You'r point about the hours / format etc is valid
and it is always necessary to keep the units of the various components the
same
ie 1 formatted as hh:mm will be 00:00 as it will treat it as 1 day !
[h]:mm would show it as 24:00

Steve

On Sun, 24 Dec 2006 15:15:56 -0000, David Biddulph
wrote:

Why would you want to multiply (B1<A1) by 24, but not multiply the B1-A1
part? If you are going to convert the answer to hours (and format as
number
or general), then you'll need to multiply the lot by 24. If you are
going
to format the answer as time then you don't need to multiply any of it by
24.