The code I use copy's some rows with a specific text in them and pastes them to another sheet. However, they're copied to the same cell as they were in their original sheet. I'd like the copied date to be paste beginning on cell B4, then B5, then B6 etc.
Thanks in advance!
The code I'm using is:
Thanks in advance!
The code I'm using is:
Code:
Private Sub CommandButton1_Click()
Dim strLastRow As String
Dim rngC As Range
Dim strToFind As String, FirstAddress As String
Dim wSht As Worksheet
Dim rngtest As String
Application.ScreenUpdating = False
Set wSht = Worksheets("Sheet2")
strToFind = "VN."
With ActiveSheet.Range("B2:B11")
Set rngC = .Find(what:=strToFind, LookAt:=xlPart)
If Not rngC Is Nothing Then
FirstAddress = rngC.Address
Do
strLastRow = Worksheets("Sheet2").Range("B" & Rows.Count).End(xlUp).Row + 1
rngC.EntireRow.Copy wSht.Cells(strLastRow, 1)
Set rngC = .FindNext(rngC)
Loop While Not rngC Is Nothing And rngC.Address <> FirstAddress
End If
End With
End Sub