Excel/Time formulas

Advertisement


Amir wrote at 2006-08-11 21:36:06
A1 is time you start

B1 is time you quit

C1 is total hours you work.



Format A1 and B1 to HH:MM

Format C1 into Number - Standard



In cell C1 use this formula:

=(B1-A1)*24



Example:

A1= 01:00

B1= 02:15



=(02:15-01:00)*24

In cell C1 you would get 1,25  


doug wrote at 2007-08-28 00:01:29
use this formula and adjust the cell references for what you need.



=IF(((HOUR(M3)+(MINUTE(M3)/60))-(HOUR(K3)+(MINUTE(K3)/60)))>=8,((HOUR(M3)+(MINUTE(M3)/60))-(HOUR(K3)+(MINUTE(K3)/60)))-0.5,((HOUR(M3)+(MINUTE(M3)/60))-(HOUR(K3)+(MINUTE(K3)/60))))


Michael wrote at 2008-06-02 17:55:03
The formula to calculate simple times in whatever format 24/12hr. (8 am - 4:30pm) is:



=(endtime-starttime-TIME(0,0,0))*24 will give you the hours worked in decimals.



in the next column use a formula

=(result-0.5)*rate of pay.

eg. a1=8 am, b1=4:30 pm

c1=(b1-a1-time(0,0,0))*24 = 8.5

d1=(c1-0.5)*12(for twelve bucks an hour)

=96$ formatted($)  


Stacee wrote at 2009-06-08 20:10:00
This will answer your question completely.  Use the formula =24*(IF(A1>B1,B1+1-A1,B1-A1)).  That will give you the 4.5 that you are looking for.


Vicky wrote at 2012-04-12 15:36:14
Hello people,



It is so simple Just say if you are subtracting some X of time from the time you have , then the formula for it is

=Field Name(A5)- TIME(1,35,10)........

Were A is the Field Name ,In the Bracket it represents Hours, Minutes, seconds.  


MotherJame wrote at 2013-10-02 04:49:44
I use =(B1-A1)*24 number format to 2 decimal places.  I hope this helps.


About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here

Excel

All Answers


Answers by Expert:


Ask Experts

Volunteer


Bill

Expertise

I can provide help with most all EXCEL questions and most all questions about writing EXCEL macros. I have been developing macros for about 10 years in EXCEL and have switched to it from Lotus 1-2-3 after about 10 years of writing macros in it. Typically, I will not write a macro for you unless it is very short because of all the details a macro has to know about to work every time and all the time are rarely provided. If I am not given ALL the details, circumstances, and situations then a "good" macro can not be written. Please understand that I do not know it all and will be the first to say so. As politely as possible, I don't write macros for people on this site who need one, want one, seem to imply that they need one, and/or seem to think I am expected to write one UNLESS they are very short, quick, and simple. 99% of all macros are more involved than what you think and rarely am I provided with enough specific and complete details to have the code work the first time and every time. This typically means too many follow-up emails, and subsequent macro changes due to lack of specific details, just to get those details so that the macro would work, all of which is on my own free time. The voice of experience from responding to many questions from people who ask me to write a macro for them from this site tells me this. I don't mean to come across as unhelpful but macros are usually very specific and without ALL of the specifics the macro I would write will not address all of your needs and the layout, location, formatting, conditions, etc. of your data and any related files the macro would have to work with. What seems like a simple task to you is almost always more involved than what you think to have the macro ALWAYS work in EVERY situation. If you have a macro you have already written and have a question about it then perhaps I could help with that. I am sure and hope you can and do understand.

©2016 About.com. All rights reserved.