Timesheet

Dannyj01

New Member
Joined
Sep 1, 2018
Messages
6
Hi all, I'm new to the forum so hi and Thankyou for any advice.

I am currently working on a timesheet for my partner, the problem I have is the way the sheet works I have a column that accumulates any flexi time over 7 and a half hours but she has started doing half days on Wednesday only so I need to try figure out how to manipulate the below code to have full days and half days.

=IF(G5=0,"",(G5-$C$1)+H4)

The $c$1 has 7:30 and it adds the flexi for the day before. If I add a 1pm finish on a Wednesday then it basically removes 4 hours from the accumulated flexi.

Any help is greatly appreciated
 

Excel Facts

Create a chart in one keystroke
Select the data and press Alt+F1 to insert a default chart. You can change the default chart to any chart type
You did not provide the layout of your data.
Several examples with expected results would be useful.


Excel 2010
BCDEFGHI
1Date7:304:00Flex Time
2
3FlexRegular
4Mon 03-Sep-187:307:30
5Tue 04-Sep-188:000:307:30
6Wed 05-Sep-184:250:254:00
1c
Cell Formulas
RangeFormula
I4=G4-H4
H5=IF((WEEKDAY(B5,2)=3),G5-$D$1,(G5-$C$1))
 
Upvote 0
Hi Dave,

I currently have the below.


[TABLE="class: grid, width: 500"]
<tbody>[TR]
[TD]A[/TD]
[TD]B[/TD]
[TD]C[/TD]
[TD]D[/TD]
[TD]E[/TD]
[TD]F[/TD]
[TD]G[/TD]
[TD]H[/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Standard Hours[/TD]
[TD]7:30[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD]Wednesday Half Day[/TD]
[TD]4:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]Day[/TD]
[TD]Date[/TD]
[TD]Morning Start[/TD]
[TD]Morning End[/TD]
[TD]Afternoon Start[/TD]
[TD]Afternoon End[/TD]
[TD]Time Worked[/TD]
[TD]Cumulative[/TD]
[/TR]
[TR]
[TD]Monday[/TD]
[TD]27/08/2018[/TD]
[TD]7:00[/TD]
[TD]12:00[/TD]
[TD]12:30[/TD]
[TD]15:00[/TD]
[TD]7:30[/TD]
[TD]0.00[/TD]
[/TR]
[TR]
[TD]Tuesday[/TD]
[TD]28/08/2018[/TD]
[TD]7:00[/TD]
[TD]12:00[/TD]
[TD]12:30[/TD]
[TD]16:00[/TD]
[TD]8:30[/TD]
[TD]1:00[/TD]
[/TR]
[TR]
[TD]Wednesday[/TD]
[TD]29/08/2018[/TD]
[TD]7:00[/TD]
[TD]13:00[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD]1:00[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
I originally had [TABLE="width: 177"]
<tbody>[TR]
[TD="class: xl65, width: 177"] =IF(G5=0,"",(G5-$C$1)+H4)[/TD]
[/TR]
</tbody>[/TABLE]

in column H to add the cumulative flexi that has been accrued during the week, this works fine everyday if everyday is a standard day of 7:30.

Since my partner has started doing half days on a wednesday, I need to be able to have the function say if column A is = to Wednesday then use 4:00 otherwise use 7:30 which would be C1 and C2.

Much appreciated for the help as this is doing my head in at the minute.

thanks,

Daniel
 
Upvote 0
Hello Daniel

The sample below shows 2 alternatives. The first version does not require the text "Wednesday".



Excel 2010
ABCDEFGH
1Standard Hours7:30
2Wednesday Half Day4:00
3DayDateMorning StartMorning EndAfternoon StartAfternoon EndTime WorkedCumulative
4Mon 27-Aug-187:0012:0012:3015:007:300:00
5Tue 28-Aug-187:0012:0012:3016:008:301:00
6Wed 29-Aug-187:0013:006:003:00
7or
8Monday27-08-187:0012:0012:3015:007:300:00
9Tuesday28-08-187:0012:0012:3016:008:301:00
10Wednesday29-08-187:0013:006:003:00
1cc
Cell Formulas
RangeFormula
G4=D4-C4+F4-E4
H4=IF((WEEKDAY(B4,2)=3),ROUND(G4-$C$2+N(H3),4),ROUND(G4-$C$1+N(H3),4))
H8=IF(A8="Wednesday",ROUND(G8-$C$2+N(H7),4),ROUND(G8-$C$1+N(H7),4))
 
Last edited:
Upvote 0

Forum statistics

Threads
1,223,888
Messages
6,175,212
Members
452,618
Latest member
Tam84

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