I'm working a spreadsheet to pick up when a given day is a public holiday, but for some reason when I add the last IF function in the formula below it starts showing an error. This is odd because the function works fine on its own. This last section is designed to catch when New Years Day falls on a weekend.
=IF(A2=FLOOR(DAY(MINUTE(YEAR(A2)/38)/2+56)&"/5/"&YEAR(A2),7)-36,"GOOD FRIDAY",IF(A2=FLOOR(DAY(MINUTE(YEAR(A2)/38)/2+56)&"/5/"&YEAR(A2),7)-35,"EASTER SATURDAY",IF(A2=FLOOR(DAY(MINUTE(YEAR(A2)/38)/2+56)&"/5/"&YEAR(A2),7)-34,"EASTER SUNDAY",IF(A2=FLOOR(DAY(MINUTE(YEAR(A2)/38)/2+56)&"/5/"&YEAR(A2),7)-33,"EASTER MONDAY",IF(AND(DAY(A2)=1,MONTH(A2)=1),"NEW YEARS DAY",IF(AND(OR(DAY(A2)=2,DAY(A2)=3),MONTH(A2)=1,WEEKDAY((DATE(YEAR(A2),1,1) ),2)>5,WEEKDAY(A2)=2),"HOLIDAY IN LIEU",""))))))
Any comments as to the problem would be appreciated.
Edited 4-Sep-2009 by geekgirlau. Reason: Remove code tag to force text to wrap