Forum Discussion
HarryHuckerby
Sep 18, 2023Copper Contributor
Mapping data into a calendar on excel
Hi, I'm currently building an annual leave tracker whereby a power automate flow automatically populates an excel table with names and dates once a submisson is approved. Currently i have t...
Patrick2788
Sep 18, 2023Silver Contributor
I presumed you don't want to include the 'H' or 'h' on weekends. Here's my solution:
=LET(
rows, ROWS(Staff),
cols, COLUMNS(AllYear),
Leave, LAMBDA(r, c,
LET(
date, INDEX(AllYear, , c),
person, INDEX(Staff, r),
IF(
WEEKDAY(date, 2) > 5,
"",
FILTER(
Table1[Code],
(Table1[Employee] = person) * (date >= Table1[First Day of Leave]) *
(date <= Table1[Last Day of Leave]),
""
)
)
)
),
MAKEARRAY(rows, cols, Leave)
)