Timesheet excel formula

Louise1111

New Member
Joined
Jan 14, 2021
Messages
3
Office Version
  1. 365
Platform
  1. Windows
Hi,
Trying to work out a spreadsheet as a timesheet.


I need it to be (If over 6 hours per day - 0.5 break)
As its two formula in one cell, I am getting slightly confused.
Need M5, over 6 - 0.5
Need N5, over 6 - 0.5 etc.

I already have a sum in the cells

=(C5-B5)*24 = (If over 6 hours per day - 0.5 break)

Any ideas please - tried a few ways.
Thanks
Louise

1611319563289.png
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
So if you are over 6 hours a day, subtract half an hour, if not, just the full amount...

Excel Formula:
=if((c5-b5)*24>6,(c5-b5)*24-.5,(c5-B5)*24)
 
Upvote 0
For a single day:
Code:
=IF(AND(RIGHT(B5,2)="AM",RIGHT(C5,2)="PM"),IF(((LEFT(C5,2)+12)-(LEFT(B5,2)))>6,((LEFT(C5,2)+12)-(LEFT(B5,2)))-0.5,((LEFT(C5,2)+12)-(LEFT(B5,2)))))
click and drag the formula for each of the remaining days.

I had to format B and C for the time, but I kept the cell with the formula general.
 
Upvote 0
For a single day:
Code:
=IF(AND(RIGHT(B5,2)="AM",RIGHT(C5,2)="PM"),IF(((LEFT(C5,2)+12)-(LEFT(B5,2)))>6,((LEFT(C5,2)+12)-(LEFT(B5,2)))-0.5,((LEFT(C5,2)+12)-(LEFT(B5,2)))))
click and drag the formula for each of the remaining days.

I had to format B and C for the time, but I kept the cell with the formula general.
Thank you, but I cant understand what you mean?
Sorry I am finding it slightly confusing.


IN cell M5 I have
=(C5-B5)*24

In Cell R5 I have
=M5+N5+O5+P5+Q5


I was ideally looking to change the formula's just for
M5, N5, O5, P5, Q5
Then again for same letters but for row below.
 
Upvote 0

Forum statistics

Threads
1,215,660
Messages
6,126,089
Members
449,288
Latest member
DjentChicken

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