adding/subtracting # of hours from a time

G

Guest

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!
 
G

Guest

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
 
D

David Biddulph

=A1+(B1/24) ?
--
David Biddulph

Mike H said:
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
 
B

Bob Phillips

=A1+B1/24

--
---
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top