I have a roster of employees and the dates they have requested off. The employee name is in column A, their location is in column B and their requested time off will either be in C through E (PTO), F through J (PH) or K through P (DH) depending on the entitlement time used. For simplicity this information will be on Test. On sheet 2 i have a calendar that i would like this information displayed on. On sheet 2 the year is in A1, the month (spelled out) is in A2 and the day is in C4. I am looking for a formula that will provide the employee name, location and type of entitlement used (PTO, PH or DH) for that date. This inforation would be displayed in cells A5, A6, A7, A8 and A9.
Here is the formula i currently have, which i am not able to get to indicate the correct entitlement. It just goes with the first item found when pulled down.
Current formula:
=IFERROR(INDEX(Test!$A$3:$A$45,SMALL(IF(DATE($A$1,MONTH(DATEVALUE($A$2&"1")),$C$4)=Test!$C$3:$P$45,ROW(Test!$C$3:$P$45)-ROW(Test!$A$3)+1),ROW(1:1)))&" - "&INDEX(Test!$B$3:$B$45,SMALL(IF(DATE($A$1,MONTH(DATEVALUE($A$2&"1")),$C$4)=Test!$C$3:$P$45,ROW(Test!$C$3:$P$45)-ROW(Test!$B$3)+1),ROW(1:1)))&" "&IF(AGGREGATE(15,6,COLUMN(Test!$C$3:$P$45)/(Test!$C$3:$P$45=DATE($A$1,MONTH(DATEVALUE($A$2&1)),$C$4)),1)<4,"(PTO)",IF(AND(AGGREGATE(15,6,COLUMN(Test!$C$3:$P$45)/(Test!$C$3:$P$45=DATE($A$1,MONTH(DATEVALUE($A$2&1)),$C$4)),1)>3,AGGREGATE(15,6,COLUMN(Test!$C$3:$P$45)/(Test!$C$3:$P$45=DATE($A$1,MONTH(DATEVALUE($A$2&1)),$C$4)),1)<9),"(PH)","(DH)")),"")
I appreciate any help that can be offered.
Here is the formula i currently have, which i am not able to get to indicate the correct entitlement. It just goes with the first item found when pulled down.
Current formula:
=IFERROR(INDEX(Test!$A$3:$A$45,SMALL(IF(DATE($A$1,MONTH(DATEVALUE($A$2&"1")),$C$4)=Test!$C$3:$P$45,ROW(Test!$C$3:$P$45)-ROW(Test!$A$3)+1),ROW(1:1)))&" - "&INDEX(Test!$B$3:$B$45,SMALL(IF(DATE($A$1,MONTH(DATEVALUE($A$2&"1")),$C$4)=Test!$C$3:$P$45,ROW(Test!$C$3:$P$45)-ROW(Test!$B$3)+1),ROW(1:1)))&" "&IF(AGGREGATE(15,6,COLUMN(Test!$C$3:$P$45)/(Test!$C$3:$P$45=DATE($A$1,MONTH(DATEVALUE($A$2&1)),$C$4)),1)<4,"(PTO)",IF(AND(AGGREGATE(15,6,COLUMN(Test!$C$3:$P$45)/(Test!$C$3:$P$45=DATE($A$1,MONTH(DATEVALUE($A$2&1)),$C$4)),1)>3,AGGREGATE(15,6,COLUMN(Test!$C$3:$P$45)/(Test!$C$3:$P$45=DATE($A$1,MONTH(DATEVALUE($A$2&1)),$C$4)),1)<9),"(PH)","(DH)")),"")
I appreciate any help that can be offered.