Hi,
So far in my excel journey, I have managed to find solutions for my needs from other answers on here, but this one has me stumped. I am having difficulty seeing where this formula needs to go, so thought I might ask this forum! In the attached file, I have a tab called Leave, which in the original document is being used to track and map all Annual Leave and Lieu days for a staff of around 60. I have only left 1 name and all the corresponding schedules and personal tabs, as if it works for 1 it will work for all...
The premise is this: On the Leave Tab
The first 5 rows are the master information that applies to everyone and is taken in part from the schedule tabs.
ROW 1 = Days of the week repeated weekly - this is just text
ROW 2 = Week Number - not needed in this context
ROW 3 = Dates from 01/06/14-31/05/15 (Our contractual year) - These are unique and the first one references the cell 'Week 23'!$B$2 and all the rest are using a Cell +1 formula.
ROW 4 = Information referenced from each weekly schedule including Public Holidays
ROW 5 = Public Holiday as the only text referenced from the cell above. Result is either Public Holiday or Blank.
The following rows reference the first staff member and will be repeated for every staff member.
ROW 6 = The start time referenced from each person on each weekly schedule. If they didn't work that day, this returns BLANK. (This row will be hidden in final view)
ROW 7 = Leave / Lieu Day information (all other information not visible through conditional formatting) - referenced from each person on each weekly schedule.
ROW 8 = Where I need help!
If you have read this far - thank you!
In ROW 8, I need a date returned when the cell above reads either Lieu-PH, Lieu-Friday or Lieu-Saturday (in that order). If the cell reads Lieu-PH, I need the date to be the earliest date that was a Public Holiday and was worked AND has not already been used (ie every date in the row must be unique). Likewise for Fridays and Saturdays. I am not sure if it is even possible, but I won't know if I don't ask right?
I can piece together some of the arguments, but I cannot get them to go together in a way which returns anything. There are way too many arguments for nested IFs and there must be a way to do this - maybe using INDEX. I have managed to create lists of the dates for each category in the Dropdown Tab, but I haven't been able to incorporate them in a useful way and am not sure if they are even necessary at this point.
So for cell B8, the idea is that if B6>0 and B7 reads any of the 3 Lieu categories, B8=the last date from the relevant list, where the corresponding cell in Row 6 is >0 and that date is not already in Row 8.
Thanks in advance for any help.
Julie.
Bookmarks