Hi,
I'm in need of a bit of help developing a formula...
I currently use the following formula to calculate hours worked on a timesheet:
Basically, the code works out whether it's a Monday-Friday (in column B) or whether it's a weekend. It then adds up the hours worked, and enters the total up to 8 hours.
I'd like users to be able to enter 'Annual Leave' in their day's description (Column C), and then the above code would automatically enter the number 8. I'm thinking something like
.
I can't work out where in the formula I'd need to put this code to make it work?! Ideally I'd like it to only do this if it's a Monday-Friday.
All help gratefully received!
Many thanks.
I'm in need of a bit of help developing a formula...
I currently use the following formula to calculate hours worked on a timesheet:
Code:
=IF(AND(OR(B8="Mon",B8="Tue",B8="Wed",B8="Thu",B8="Fri"),N8=""),IF(((E8-D8+(E8<D8))+(G8-F8+(G8<F8))+(I8-H8+(I8<H8)))*24>8,8,((E8-D8+(E8<D8))+(G8-F8+(G8<F8))+(I8-H8+(I8<H8)))*24),0)
Basically, the code works out whether it's a Monday-Friday (in column B) or whether it's a weekend. It then adds up the hours worked, and enters the total up to 8 hours.
I'd like users to be able to enter 'Annual Leave' in their day's description (Column C), and then the above code would automatically enter the number 8. I'm thinking something like
Code:
IF(C8="Annual Leave",8,0)
I can't work out where in the formula I'd need to put this code to make it work?! Ideally I'd like it to only do this if it's a Monday-Friday.
All help gratefully received!
Many thanks.