Forum Discussion
Deleted
Aug 16, 2022Function or Formula to get a value for each cell from multiple logical test.
I'm newbie to VBA and have limited knowledge in making complex formulas in spreadsheet so I'm having difficulty thinking of a better approach to achieve my desired results.
I want each cell in multiple rows and columns to get a value of 1 or "" depending on the following logical test:
If Name and Date cell are blank then value is "".
If Employee is in Shift A then the cell in a row will get value of 1 from the start date up to certain numbers of cell depending of Work Rotation selected, employees in Shift B will start after the roster completion of Shift A. The rotation will continue until the end of current year.
Number of cell with 1 value will depends on rotation e.g. 3-3 Weeks (21 days on & 21 days off) or 6-2 Weeks (42 days on & 14 days off) and so on...
Also I want to get 0 in the 1st cell of days off, similar to the photo below.
There's a table for Work Rotation, chosen roster with number of days onsite & offsite at the bottom using XLOOKUP function.
No Replies