-
[vba]Option Explicit
Option Compare Text
Sub CopyReport()
Dim C As Range, Tgt As Range
Dim FirstAddress As String
With Worksheets(1).Range("H:H")
Set C = .Find("Report", LookIn:=xlValues)
If Not C Is Nothing Then
FirstAddress = C.Address
Do
Set Tgt = Sheets(3).Cells(Rows.Count, "H").End(xlUp).Offset(1,-7)
C.EntireRow.Copy Tgt
Set C = .FindNext(C)
Loop While Not C Is Nothing And C.Address <> FirstAddress
End If
End With
End Sub[/vba]
MVP (Excel 2008-2010)
Post a workbook with sample data and layout if you want a quicker solution.
To help indent your macros try Smart Indent
Please remember to mark threads 'Solved'
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules