vba - Formula to automate scheduling tool Excel -


i have 1 worksheet lists every employees' start , end time each day of week. on worksheet have show data in colored bars greater how many people working each hour. insert "1" each of cells apply when employee should working. don't know if need combination of match,index,if statements. appreciated.

you need countifs formula.

on sheet 1, enter in employee names , work times, start , end times in separate columns. should have employees' names in column a, start time on monday in column b, end time monday in column c, start time tuesday in column d, etc. format start , end time cells times.

on sheet 2, create table days of week column headers starting in column b , skipping every other column in row 1 (monday in col b, tues in d, etc), , each hour of work day down column starting in row 2.

on sheet 2 enter formula in b2:

    =countifs('sheet1'!b$2:b$#ofemployees,"<="&$a2,'sheet1'!c$11:c$14,">="&$a3) 

"#ofemployees" should not in formula. number of employees have. need enter in number here complete range.

sheet1 name of sheet employees' names , work times on.

drag formula down end of work day. select range b2 dragged down, , drag across end of week. in every other column, see number of people working hour.

select range b2 end of table. under home tab, go conditional formatting , select appropriate color scale.

on sheet 2, hide columns blank data in table (between days of week) if want clean bit.


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -