ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   adding/subtracting # of hours from a time (https://www.excelbanter.com/excel-discussion-misc-queries/149935-adding-subtracting-hours-time.html)

HROBERTSON

adding/subtracting # of hours from a time
 
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!

Teethless mama

adding/subtracting # of hours from a time
 
A1: holds 12:30 AM
B1: holds 1.5

C1: =A1-(B1/24)


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


Mike H

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!


David Biddulph[_2_]

adding/subtracting # of hours from a time
 
=A1+(B1/24) ?
--
David Biddulph

"Mike H" wrote in message
...
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!




Bob Phillips

adding/subtracting # of hours from a time
 
=A1+B1/24

--
---
HTH

Bob

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



"HRobertson" wrote in message
...
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!




Mike H

adding/subtracting # of hours from a time
 
Absolutely correct thanks

"David Biddulph" wrote:

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

"Mike H" wrote in message
...
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!






All times are GMT +1. The time now is 09:55 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com