How to calculate hours in a cell? Example [12-4] = 4 hrs

  • Thread starter Thread starter vrsantana
  • Start date Start date
V

vrsantana

I created a spreadsheet that I use to make my employee schedule. I would
like to add a column to give me a running total of the hours for each
particular person. I can't seem to figure out how to tell excel that for
example if I have 9-2 in a cell, that I want that cell's value to be 5. Will
I have to create a formula for every combination of hours and what each value
is?
 
You have to subtract the "Start time" from the "End time", you currently
are trying to do it backwards.
 
Hi

Why not enter StartTime in colomn A and EndTime in column B, then calculate
working hours in column C with this formula: =B1-A1

All columns to be formatted as time.

BTW: Format the cell for total working hours as costum [t]:mm to have the
cell show more than 24 hours.

Regards,
Per
 
How so? Not sure I get what you are trying to explain. How is subtracting,
for example, 9 from 12 going to give me a value of 5?
 
The Ending time is the larger number, you subtract the starting time
from the ending time to get the number of hours worked. As to your
example. Subtracting 9 from 12 will give you 3 hours worked, not 5, and
if you subtract 12 from 9 you will have a negative 3, not 5. Now on the
other hand if you really meant 2pm instead of 12, then it is really 14
not 2, and subtracting 9 from 14 will give you 5!
 
It sound as it you are using numbers instead of XL times. Try entering the
times as 9:00 and 14:00 Say your starting time of 9:00 was in B2 and the
end time of 14:00 is in C2, then C2-B2 will return 5:00

You can enter the times as 9:00 AM and 2:00 PM (Note the space between the
:00 and the AM) However, C2-B2 will then return 5:00 AM. To get 5:00 you
will have to reformat the cell as hh:mm

--
HTH

Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings

(e-mail address removed)
Replace @mailinator.com with @tiscali.co.uk
 

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

Back
Top