Function dependent on the day of the week

  • Thread starter Thread starter seftonbarn
  • Start date Start date
S

seftonbarn

I am a bit of a novice so please forgive me if this is a very basi
posting. I have a number of columns and at the top of each there is
date. Under our flexi time scheme an employer gets an hours flexi fo
every hour worked over an 8 hour day Monday to Thursday, an hour
flexitime for every hour worked over a 6 hour day on a Friday and a
hour flexi time for every hour worked over a weekend. I need a fiel
with a formula that will calculate the flexi time eraned eac
day??????
 
Hi
lets say row 2 contains your hours per day (stored as Excel time hh:mm)
then enter the following in A3
=IF(WEEKDAY(A1,2)<=4,MAX(0,A2-8/24),IF(WEEKDAY(A1,2)=5,MAX(0,A2-6/24),A
2))
and copy this for all columns (format these cells also as 'Time')
 
Thank you. Itried that but it did not work. Perhaps I should simplify
In column A2 the number of hours worked is listed as a rounded whol
number. Could that affect your formula?
 
Hi
yes :-) In this case use:
=IF(WEEKDAY(A1,2)<=4,MAX(0,A2-8),IF(WEEKDAY(A1,2)=5,MAX(0,A2-6),A2))
 
Back
Top