View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
Mike H Mike H is offline
external usenet poster
 
Posts: 11,501
Default adding/subtracting # of hours from a time

Your making life very difficult for yourself putting a sign against the 1.5
(-1.5).

First the subtraction without the sign is easy:-

=A1 -( B1/24)
Where A1 is the time (12:30) and B1 is 1.5
If however B1 contains -1.5 then the formula evaluates this as + becaue -- = +
You could use

=A1 -( ABS(B1/24))

but then it wouldn't add times if that was what you wanted it to do

Mike



"HRobertson" wrote:

Good morning.

Is there a way to add or subtract a number (signifying the number of hours)
to a time. For example, in one column I have a time: 12:30PM, in the next
column I have a number -1.5, and I want to say, what is 12:30PM minus the 1.5
hours to equal 11:00AM?

Any help would be greatly appreciated. Thank you very much!