I'm trying to use the function =DATE(YEAR($F7)+$G7,12,31) in an IF statement but the results are mixed.
Please refer to the attached excel file to review a sample worksheet layout and data content.
Beginning in Cell O6 I entered this formula =IF(YEAR(O$1)>DATE(YEAR($F6)+$G6,12,31),0,1) and copied it through Cell Y6. For Cells O6 thru S6 (years 2014 thru 2018) I expected the formula to report 1 (one) and in years 2019 through 2024 I expected a 0 (zero). Instead I received a 1 in all years. What did I do wrong?
Beginning in Cell O7, I incorporated the above formula with a VLookup function. This formula again tests if the year in, for example, cell O$1 (i.e., 12/31/2014) is greater than the "end year" that is calculate using cells $F7 and G7 (Date(Year(F7)+G7,12,31) and - if true report 0, else perform the VLookup function. I copied the formula in Cell O7 through to Cell Y7 and on the attached Excel file you will see some mixed results.
Beginning in Cell O8 thru Y8, I've entered the correct values, which are manually calculated.
Thank you for any help you can provide in helping me make sense of what the formula in row 6 and 7 should be.
Bookmarks