title: Find date value in a column VBA
body: <p><a href="http://i.stack.imgur.com/CMel1.jpg" rel="nofollow">data on my Excel sheet</a>I would like to finde a date in column A. This is the date formát: "yyyy/mm/dd hh:mm:ss". It always find nothing, but the date what I am searching for is in the column A.
  This is a snippet of my code:</p>
  
  <pre><code>Dim LastDay As Date
  Dim strdate As String
  Dim rCell As Range
  
  strdate = Format(LastDay, "yyyy/mm/dd hh:mm:ss")
  
  Set rCell = Cells.Find(What:=CDate(strdate), After:=Range("A1"), LookIn:=xlValues _
          , LookAt:=xlWhole, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:=False)
  
  If rCell Is Nothing Then
  MsgBox ("nothing")
  Else
  </code></pre>
  
  <p><strong>EDIT:</strong> New code per comments.</p>
  
  <pre><code>Sub Copy()
      Dim LastDayRow As Long
      Dim FirstDayRow As Long
      Dim LastDay As Date
      Dim FirstDay As Date
      Dim rcell As Range
  
      LastDayRow = Range("E" &amp; Rows.Count).End(xlUp).Row
      Range("E" &amp; LastDayRow).Copy Range("G1")
      FirstDayRow = Range("A" &amp; Rows.Count).End(xlUp).Row
      Range("A" &amp; FirstDayRow).Copy Range("G2")
      LastDay = Cells(LastDayRow, "E").Value
      FirstDay = Cells(FirstDayRow, "A").Value
  
      Set rcell = Cells.Find(What:=LastDay, After:=Range("A1"), LookIn:=xlFormulas _
                  , LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext)
  
      If rcell Is Nothing Then
          MsgBox ("nothing")
      End If
  
  End Sub
  </code></pre>