title: Excel: IF statement with Dates
body: <p>I am trying to have excel look at a cell(M2), identify which year is in the date and then fill my current cell(N2) with that year.  Here is my current code below, which doesn't work.</p>
  
  <p>=if(M2 = Year(2017),"2017",if(M2 = Year(2018),"2018",if(M2 = Year(2019),"2019", "Before 2017")))</p>