Formula required

Ian66

New Member
Joined
Nov 15, 2023
Messages
2
Office Version
  1. 365
Platform
  1. Windows
In the screen shot below, it relates to flexi time showing a decimal flexi (either a plus or minus for the day. Merged cell G/H6 is a day of the week and updates automatically depending on the date in merged cell G/H5.

Rotated hours of work as follows: Monday work 8 hours - Tuesday work 6 hours - Wednesday 5 hours - Thursday 6 hours - Friday 5 hours. Currently I’m currently typing in the rotated hours in merged cell I2. Is it possible for cell I2 to update automatically with the relevant hour depending on the day in merged cell G/H6.
1700088067946.png

In example below, a person is rotated to work 5 hours, but has worked 50 minutes longer returning a decimal flexi amount of 0.83.
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
I suspect there is a lot more to this but lets start with this.
In I2 try this:
Excel Formula:
=TIME(CHOOSE(WEEKDAY(G5,2),8,6,5,6,5),0,0)

It doesn't seem to make sense to hard code those hours though. I would think you would want to have a lookup table but I suspect it would need more criteria than just the day of the week.
 
Upvote 0
Solution
I suspect there is a lot more to this but lets start with this.
In I2 try this:
Excel Formula:
=TIME(CHOOSE(WEEKDAY(G5,2),8,6,5,6,5),0,0)

It doesn't seem to make sense to hard code those hours though. I would think you would want to have a lookup table but I suspect it would need more criteria than just the day of the week.
Sorry if my query didn’t make much sense, but the formula you provided appears to work and what I wanted. Much appreciated – thanks Ian
 
Upvote 0

Forum statistics

Threads
1,224,798
Messages
6,181,038
Members
453,014
Latest member
Chris258

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