title: Using the Year in one cell to determine the contents for another cell
body: <p>What I want to do is have a value put into a column based on the year in the other column. The year column is in MM/DD/YYYY format. I am not a very experienced VBA programmer, but I am trying to learn it as fast as I can.</p>
  
  <p>I've already tried using the Year() function in an IF statement to see if it will show the text I want it to, but it shows nothing in the cell. </p>
  
  <pre><code>Dim SrchRng As Range, cel As Range
  
  Set SrchRng = Range("D1:D9")
  
  For Each cel In SrchRng
      If IsEmpty(cel) And Year(cel.Offset(0, -1)) = Year(2020) Then
          cel.Offset(0, -2).Value = "Test"
      End If
  Next cel
  </code></pre>
  
  <p>Nothing shows up in the cel -2 cell and I am unsure what to try next. Any help would be greatly appreciated.</p>