excel should allow to add and subtract times

L

LV

The INT and TEXT Functions are insufficent. I need to automate filling out
time cards for multiple people. INT only calculates whole hours and TEXT is
not summable.
 
P

Peo Sjoblom

What does that mean? What are you trying to do and what are you unable to do?

Regards,

Peo Sjoblom
 
L

LV

Paul,

Thanks for your help, but all of those functions use the INT function, which
rounds to the nearest integer.

Say some one come in at 8:45 AM, leaves for Lunch at 12:30, Returns at 1:00,
and leaves the office at 5:00 PM. I need to automate finding the amount of
hours that individual worked (7.75) I know it seems lazy, but it would help
me out in my daily tasks.

LV
 
T

tjtjjtjt

What problem are you having exactly?
If I put your times in four cells:
8:45 in A1
12:30 in A2
1:00 in A3
5:00 in A5
and then put the following formula in A5: =(A2-A1)+(A4-A3), I get 7:45.
For A5, I set the Format to a a Custom Format of [h]:mm. For the other four
cells, I just Excel recognize the times I typed in. Why not go to Format |
Cells and look at some of the Time Formats? Using one of them will avoid you
having to work with TEXT or INT.

What formulas on these pages use INT?
http://www.cpearson.com/excel/datearith.htm#AddingTimes
http://www.cpearson.com/excel/overtime.htm

tj

Also, which formulas on this page use INT?
 
T

tjtjjtjt

Accidentally sent the message too soon.

To convert it to 7.75, all you need to do is multiply it by 24 and format
the cell as General.

=((A2-A1)+(A4-A3))*24
Set the cell Format to General. Format | Cells | Number and click General in
the list provided.

tj
 
P

Paul B

LV, Excel keeps time as a fraction of a day, multiply by 24 to get hours in
decimal format, be sure to format the result as general or number


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003
 

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