Reputation: 2402
I am trying to build dynamic time schedule with function, that will take in consideration how many days/week will be working days.
All lighter green cells are changeable, user inputs data in there. White color cell with header END is calculated. My current formula is located in Column END
(it is affecting bar) and result should be:
I don't think this is much help, but as rules are requiring to post what has been tried yet, here it is:
IF(G10>6;D10+F10-1;IF(G10<=5;(D10+F10-1)+CEILING((F10/7);1)*2;(D10+F10)+CEILING((F10/7);1)
How it should be edited to work correct?
Upvotes: 0
Views: 52
Reputation: 9874
Assuming no holidays, you can use the following formula in E10 and copy down:
=(D10+IF(WEEKDAY(D10,2)>G10,8-WEEKDAY(D10,2),0))+F10+((ROUNDUP((F10+((WEEKDAY((D10+IF(WEEKDAY(D10,2)>G10,8-WEEKDAY(D10,2),0)),2))-1))/G10,0)-1)*(7-G10))-1
In column H I used a COUNTIF function to count the number X's in order to verify the right number of days were represented.
Upvotes: 1