A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Excel » Worksheet Functions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Time Calculation



 
 
Thread Tools Display Modes
  #1  
Old December 19th, 2007, 12:51 PM posted to microsoft.public.excel.worksheet.functions
alex
external usenet poster
 
Posts: 581
Default Time Calculation

Hello experts,

Question on how to add hours to a time...

E.g., I have a time in A1 (let's say 6:06 AM)
I want to add an amount to A1 (let's say 8.5 hrs in cell B1)
My formula in C1 = A1+ Time(B1,30,0) [i'm adding a half hour for
lunch]

My formula returns 2:36 PM, I want it to return 3:06 PM (6:06 AM plus
8.5 hrs plus 30 minutes).

This formula works well when the amount in B1 is an integer (I know
this is obvious because the Time function reads Time(hour, minute,
second).

I need a way to calculate a partial hour. I'd like this formula to
remain dynamic; i.e., allowing me to dump my start time in one cell,
my hours (any hour(s)) in another cell, and my ending hours in the
final cell. Keep in mind the time in A1 will change daily, as well as
the hours in cell B1; the 30 min for lunch, however, will not.

Thoughts?



  #2  
Old December 19th, 2007, 12:55 PM posted to microsoft.public.excel.worksheet.functions
Fred Smith
external usenet poster
 
Posts: 553
Default Time Calculation

You want:

c1: =a1+b1+time(0,30,0)

--
Regards,
Fred


"alex" wrote in message
...
Hello experts,

Question on how to add hours to a time...

E.g., I have a time in A1 (let's say 6:06 AM)
I want to add an amount to A1 (let's say 8.5 hrs in cell B1)
My formula in C1 = A1+ Time(B1,30,0) [i'm adding a half hour for
lunch]

My formula returns 2:36 PM, I want it to return 3:06 PM (6:06 AM plus
8.5 hrs plus 30 minutes).

This formula works well when the amount in B1 is an integer (I know
this is obvious because the Time function reads Time(hour, minute,
second).

I need a way to calculate a partial hour. I'd like this formula to
remain dynamic; i.e., allowing me to dump my start time in one cell,
my hours (any hour(s)) in another cell, and my ending hours in the
final cell. Keep in mind the time in A1 will change daily, as well as
the hours in cell B1; the 30 min for lunch, however, will not.

Thoughts?





  #3  
Old December 19th, 2007, 01:03 PM posted to microsoft.public.excel.worksheet.functions
David Biddulph
external usenet poster
 
Posts: 8,714
Default Time Calculation

Are you sure, Fred? That would work if B1 was 8:30, but I believe that the
OP meant that he had 8.5 in B1.
In that case, he needs
=A1+B1/24+time(0,30,0)
--
David Biddulph

"Fred Smith" wrote in message
...
You want:

c1: =a1+b1+time(0,30,0)

--
Regards,
Fred


"alex" wrote in message
...
Hello experts,

Question on how to add hours to a time...

E.g., I have a time in A1 (let's say 6:06 AM)
I want to add an amount to A1 (let's say 8.5 hrs in cell B1)
My formula in C1 = A1+ Time(B1,30,0) [i'm adding a half hour for
lunch]

My formula returns 2:36 PM, I want it to return 3:06 PM (6:06 AM plus
8.5 hrs plus 30 minutes).

This formula works well when the amount in B1 is an integer (I know
this is obvious because the Time function reads Time(hour, minute,
second).

I need a way to calculate a partial hour. I'd like this formula to
remain dynamic; i.e., allowing me to dump my start time in one cell,
my hours (any hour(s)) in another cell, and my ending hours in the
final cell. Keep in mind the time in A1 will change daily, as well as
the hours in cell B1; the 30 min for lunch, however, will not.

Thoughts?







  #4  
Old December 19th, 2007, 01:12 PM posted to microsoft.public.excel.worksheet.functions
alex
external usenet poster
 
Posts: 581
Default Time Calculation

On Dec 19, 7:55 am, "Fred Smith" wrote:
You want:

c1: =a1+b1+time(0,30,0)

--
Regards,
Fred

"alex" wrote in message

...



Hello experts,


Question on how to add hours to a time...


E.g., I have a time in A1 (let's say 6:06 AM)
I want to add an amount to A1 (let's say 8.5 hrs in cell B1)
My formula in C1 = A1+ Time(B1,30,0) [i'm adding a half hour for
lunch]


My formula returns 2:36 PM, I want it to return 3:06 PM (6:06 AM plus
8.5 hrs plus 30 minutes).


This formula works well when the amount in B1 is an integer (I know
this is obvious because the Time function reads Time(hour, minute,
second).


I need a way to calculate a partial hour. I'd like this formula to
remain dynamic; i.e., allowing me to dump my start time in one cell,
my hours (any hour(s)) in another cell, and my ending hours in the
final cell. Keep in mind the time in A1 will change daily, as well as
the hours in cell B1; the 30 min for lunch, however, will not.


Thoughts?- Hide quoted text -


- Show quoted text -


Thanks Fred for the quick response...
The formula does not seem to work; I get 6:36 PM when I use your
formula.
It doesn't seem to recognize cell B1 as hours. Maybe I need to format
the cell in another manner?
  #5  
Old December 19th, 2007, 01:16 PM posted to microsoft.public.excel.worksheet.functions
alex
external usenet poster
 
Posts: 581
Default Time Calculation

On Dec 19, 8:12 am, alex wrote:
On Dec 19, 7:55 am, "Fred Smith" wrote:





You want:


c1: =a1+b1+time(0,30,0)


--
Regards,
Fred


"alex" wrote in message


...


Hello experts,


Question on how to add hours to a time...


E.g., I have a time in A1 (let's say 6:06 AM)
I want to add an amount to A1 (let's say 8.5 hrs in cell B1)
My formula in C1 = A1+ Time(B1,30,0) [i'm adding a half hour for
lunch]


My formula returns 2:36 PM, I want it to return 3:06 PM (6:06 AM plus
8.5 hrs plus 30 minutes).


This formula works well when the amount in B1 is an integer (I know
this is obvious because the Time function reads Time(hour, minute,
second).


I need a way to calculate a partial hour. I'd like this formula to
remain dynamic; i.e., allowing me to dump my start time in one cell,
my hours (any hour(s)) in another cell, and my ending hours in the
final cell. Keep in mind the time in A1 will change daily, as well as
the hours in cell B1; the 30 min for lunch, however, will not.


Thoughts?- Hide quoted text -


- Show quoted text -


Thanks Fred for the quick response...
The formula does not seem to work; I get 6:36 PM when I use your
formula.
It doesn't seem to recognize cell B1 as hours. Maybe I need to format
the cell in another manner?- Hide quoted text -

- Show quoted text -


You nailed it David...thanks.
  #6  
Old December 19th, 2007, 11:21 PM posted to microsoft.public.excel.worksheet.functions
Fred Smith
external usenet poster
 
Posts: 553
Default Time Calculation

Thanks for catching the error, Dave. I was fixated on the wrong parameters for
the Time function, I forgot to verify whether b1 was time or hours.

--
Regards,
Fred


"David Biddulph" groups [at] biddulph.org.uk wrote in message
...
Are you sure, Fred? That would work if B1 was 8:30, but I believe that the OP
meant that he had 8.5 in B1.
In that case, he needs
=A1+B1/24+time(0,30,0)
--
David Biddulph

"Fred Smith" wrote in message
...
You want:

c1: =a1+b1+time(0,30,0)

--
Regards,
Fred


"alex" wrote in message
...
Hello experts,

Question on how to add hours to a time...

E.g., I have a time in A1 (let's say 6:06 AM)
I want to add an amount to A1 (let's say 8.5 hrs in cell B1)
My formula in C1 = A1+ Time(B1,30,0) [i'm adding a half hour for
lunch]

My formula returns 2:36 PM, I want it to return 3:06 PM (6:06 AM plus
8.5 hrs plus 30 minutes).

This formula works well when the amount in B1 is an integer (I know
this is obvious because the Time function reads Time(hour, minute,
second).

I need a way to calculate a partial hour. I'd like this formula to
remain dynamic; i.e., allowing me to dump my start time in one cell,
my hours (any hour(s)) in another cell, and my ending hours in the
final cell. Keep in mind the time in A1 will change daily, as well as
the hours in cell B1; the 30 min for lunch, however, will not.

Thoughts?









 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 07:53 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.