title: How to get date - 1 year in vba
body: <p>I have a row of trading dates, stored in Column A. It contains trading days and hence, it doesn't contain all the days in a year. I would like to get a particular date and remove one year from it. I would like to find the index of the newdate cell within the same column. If not possible I would like to find the next closest date.</p>
  
  <p>What I have tried so far:</p>
  
  <pre><code>Dim date1 As Double
  date1 = Sheets("Part2").Cells(i, 1).Value
  Dim matchRow As Integer
  matchRow = 3
  While Sheets("1.A").Cells(matchRow, 1).Value &lt;&gt; date1
  matchRow = matchRow + 1
  Wend
  </code></pre>
  
  <p>I am able to get a particular date in sheet but now I need to get the date one year before that, if not next nearest date after that.</p>
  
  <p>Need some guidance on doing this. </p>
  
  <p>Also tried:
  Sheets("Part2").Cells(i, 1).Value -365. It is not working..</p>