I have a list of holidays and a table that updates the table cells with dates of the holidays based on the year. Here is a formula that works in Excel, but I don't know how to translate it into code. for example, there is an "If" statement and IF/THEN/ELSEIF/END IF procedures are different in vba than in Excel.
Anyone care to translate the following for me?
=DATE(theyear,2,1)+IF(2<WEEKDAY(DATE(theyear,2,1)),7-WEEKDAY(DATE(theyear,2,1))+2,2-WEEKDAY(DATE(theyear,2,1)))+((3-1)*7) [this translates to president's day]
"theyear" is a named range for the year entered, e.g., "2011"
=DOLLAR(("4/"&theyear)/7+MOD(19*MOD(theyear,19)-7,30)*14%,)*7-6 [this translates to Easter day]
Bookmarks