i build an empty Work schedule Employee reporting
E6 = the month
H12 = the yere
A10-A40 = date with formula =DATE(H6,E6,1)
A11= =IF(A10="","",IF(MONTH(A10 1)<>MONTH(A10),"",A10 1))
To limit the days in a month
B10 = weekday
i have a spreadsheet that called holidays
A=holiday date
B=name of the holiday
I try to include in the name of the day if it has a holiday the name of the holiday instead of the name of the day
this is my code B10
=IF(ISERROR(VLOOKUP(A10,holidays!A:B,2,0)),TEXT(WEEKDAY(A10),"dddd")
CodePudding user response:
Not sure if this is what you mean, but if you have office365 you can use this:
=LET(first,D2,
last,E2,
hday,A2:A4,
hdayname,B2:B4,
seq,first SEQUENCE(DATEDIF(first,last,"D") 1,,0),
IF(COUNTIF(hday,seq),
XLOOKUP(seq,hday,hdayname,,0),
TEXT(seq,"dddd")))
Edit after new info shared:
For older Excel versions:
=IFERROR(VLOOKUP(A10,holidays!A:B,2,0)),TEXT(WEEKDAY(A10),"dddd"))
if as written in the post, or:
IFERROR(INDEX(holidays!B:B,MATCH(A10,holidays!A:A,0)),TEXT(WEEKDAY(A10),"dddd"))
if as shown in the picture.