Formula help for timesheet?

bmorris

New Member
Joined
Oct 1, 2010
Messages
48
I am looking for formula and formatting to make entering a time in and a time out super simple as well at the formula for totals! Please help!
Time InTime OutTotal Hours
8:0012:304.50
1:008:157.25

<colgroup><col style="width: 67pt; mso-width-source: userset; mso-width-alt: 3157;" span="2" width="89"> <col style="width: 82pt; mso-width-source: userset; mso-width-alt: 3896;" width="110"> <tbody>
</tbody>
 
Good Morning!
I entered in custom hh:mm and this is the result:
Time InTime OutTotal Hours
00:0000:00

<colgroup><col style="width: 67pt; mso-width-source: userset; mso-width-alt: 3157;" span="2" width="89"> <col style="width: 82pt; mso-width-source: userset; mso-width-alt: 3896;" width="110"> <tbody>
</tbody>
 
Upvote 0

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
Good Morning!
I entered in custom hh:mm and this is the result:
Time InTime OutTotal Hours
00:0000:00

<tbody>
</tbody>
What do you get if you type 8:00 in time in and 10:00 in time out?
 
Upvote 0
That screen shot is the result when I tyup 8:00 and 10:00.
Thank you for your help with this. For now, I am going to allow my users to write in a time until I can get this figured out.
If you have any other ideas, I would appreciate your help!
 
Upvote 0
If you use the formula as provide by JoeMo in column C as advised, you can use this bit of code to put : in between the numbers inserted in cells in Column A and B ie: if you type 1200 in cell A2 then it will become 12:00 so the user will not have to enter it as a time just a number.

Private Sub Worksheet_Change(ByVal Target As Range)
Dim UserInput, NewInput
'Adjust Ranges To Suit
If Not Intersect(Target, Me.Range("A1:A20,B1:B25")) Is Nothing Then

UserInput = Target.Value
If UserInput > 0 Then
NewInput = Left(UserInput, Len(UserInput) - 2) & ":" & Right(UserInput, 2)

Application.EnableEvents = False
Target = NewInput
Application.EnableEvents = True
End If
End If
End Sub

Hope that helps
 
Upvote 0
Hi BJ,
Where do I insert this "code"? This is really cool, I appreciate your help with this......but I am a bit challenged when it comes to this degree of excel!!
 
Upvote 0
Just right click on the sheet tab and copy and paste code into sheet module, also try this formula in column C =B1+(A1>B1)-A1 and copy down to calculate the hours worked. Format the cells in column C as h:mm and you will get the correct hours worked.
 
Upvote 0
We are getting really close with this!!! Ok....this is what I have now after doing all this you recommended: Did I do something wrong?
DayDateJobCost CodeTime InTime OutTotal Hours
Saturday4/26/14 8:0010:002:00
Saturday4/26/14 11:003:00##########
Saturday4/26/14 4:008:004:00
Sunday4/27/14 0:00
Sunday4/27/14 0:00
Sunday4/27/14 0:00
Monday4/28/14 7:3011:003:30
Monday4/28/14 12:006:30##########
Monday4/28/14 0:00

<colgroup><col style="width: 105pt; mso-width-source: userset; mso-width-alt: 4977;" width="140"><col style="width: 67pt; mso-width-source: userset; mso-width-alt: 3157;" width="89"><col style="width: 80pt; mso-width-source: userset; mso-width-alt: 3783;" width="106"><col style="width: 81pt; mso-width-source: userset; mso-width-alt: 3840;" span="3" width="108"><col style="width: 62pt; mso-width-source: userset; mso-width-alt: 2929;" width="82"><tbody>
</tbody>
 
Upvote 0
Not sure why you are getting # in your total hours column, My workbook does not do this, I have the columns, time in and time out formatted as text and the total hours column formated as h:mm in custom formating.

If you want the total hours column to be blank unless a time is entered for an employee try this =IF(B1="","",B1+(A1>B1)-A1) adjust range to suit.

Hope that helps.
 
Upvote 0
I tried this again in a new spreadsheet and I get the same result when I input times that cross of the "lunch hour". I guess this timesheet isn't as easy as I had hoped it would be! Thank you for all your help!
 
Upvote 0

Forum statistics

Threads
1,216,104
Messages
6,128,856
Members
449,472
Latest member
ebc9

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top