title: Excel Visual basic help needed
body: <p>I have a scenario here where in I have a three tab called 
  Sheet1, Sheet2, Sheet3 and Column H of each sheet contains date.</p>
  
  <p>What i want a VBA program where in user defines
  the start date and end date using input box and the 
  program has to loop in column H to find if the 
  date on cells falls in between the date range specified
  by the user in the input box. If the program is able
  to find a date which is between the range specified by the 
  user then copy that row and paste in a new tab called "FINAL"
  in the same way it has to go to sheet 2 and perform the same action
  and copy the row and paste in "FINAL" Tab.</p>
  
  <p>So if you see two looping is required onc in the column H and 
  then in Sheets</p>
  
  <p>I have written some thing like this but having a hard time to get this 
  done, any help on this respect will greatly be appreciated.</p>
  
  <pre><code>Sub CopyData()
      Application.ScreenUpdating = False
      Dim inputboxa As Date
      Dim inputboxb As Date
      Dim ws As Worksheet
      Dim cell As Range
  
      inputboxa = startdate
      inputboxb = enddate
  
      startdate = InputBox("Enter Start Date" &amp; vbCrLf &amp; vbCrLf &amp; "dd/mm/yyyy Format", "Lease", "01/02/2014", 500, 700)
      enddate = InputBox("Enter enddate Date" &amp; vbCrLf &amp; vbCrLf &amp; "dd/mm/yyyy Format", "Lease", "28/02/2014", 500, 700)
  
      For Each ws In Worksheets
  
          If ws.Visible = True And ws.Name &lt;&gt; "303010 V094" Then
              Sheets(ws.Name).Select
  
              For Each cell In Range("H1:H1000").Cells
                  ''Range("h1:h1000").Select
                  ''Do Until Range("h1:h1000").Value = vbNullString
                  If Range(cell).Value &gt;= startdate And Range("h1").Value &lt;= enddate Then
                      Range(cell).EntireRow.Copy Sheets("test").Cells(Rows.Count, "A").End(xlUp).Offset(2, 0)
                  End If
              Next cell
  
              Application.ScreenUpdating = True
              ''End If
          End If
      Next ws
  End Sub
  </code></pre>