calculating clock times

G

gma

if i enter "7:00 am in one cell and 5:45 pm in another cell, what formula do
in enter in another cell to caluclate the time?
 
L

Lars-Åke Aspelin

if i enter "7:00 am in one cell and 5:45 pm in another cell, what formula do
in enter in another cell to caluclate the time?

If the first cell is A1 and the other cell is A2, try the following
formula in a third cell:

=A2-A1

Format the third cell to display the time difference the way you like.

Hope this helps / Lars-Åke
 
F

FSt1

hi
do you mean subtract or add??
=sum(A2-B2) or +
just remember that excel keeps track of time as a percent of a day.
12 noon is .5 day. enter 7:00 in one cell and 5:45 in another. reformat to
general. these are the accual numerical values that excel is seeing.
formating doesn't change data, it just changes the way it looks on the sheet.

regards
FSt1
 
F

Fred Smith

What value is using Sum? And if you're subtracting times, you want the
result formatted as a time, not General.

Regards,
Fred
 
D

David Biddulph

I hope that instead of =sum(A2-B2) you intended to say =A2-B2 ?
If not, what is the SUM function doing for us in that formula?
 
F

FSt1

hi
i was trying to illistrate a point about the real values behind the formated
times. obviously one would want the value formated as time but it does help
to know what is going on behind the formating ie it's not hocos pocus. it's
simple math using real numbers simply formated to look another way.

regards
FSt1
 
G

gma

All
Let me try this way
cell one: 06:00 am
cell two: 02:30 pm
cell three: formula/calculating cell: 8.5 hours
when i change the numbers in the either cell one or two it changes cell
three to what ever time differance, + or -
 

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