please help me edit this code to pertain to my file, essentially this should do what i want just needs to be formated for my file.
i need the file to look through all of column "B" find the cells that have "PA" displayed in column B and then copy that rows data to a new sheet. if possible for all tabs in file one for each day of the year.
thank you in advance.
Sub FIND_TEST3()
Dim n1 As String
Dim Wks As Worksheet
Dim c As Range
Dim firstAddress As String
Dim DestCell As Range
Set Wks = Worksheets("IRS Commission")
n1 = Sheets("Employee Data Entry").Range("D2").Value
With Wks
With .Range("I1").EntireColumn
Set c = .Cells.find(What:=n1, _
after:=.Cells(.Cells.Count), _
LookIn:=xlValues, _
LookAt:=xlWhole, _
SearchOrder:=xlByRows, _
SearchDirection:=xlNext, _
MatchCase:=False)
If Not c Is Nothing Then
firstAddress = c.Address
Do
With Worksheets(n1)
Set DestCell = .Cells(.Rows.Count, "A").End(xlUp).Offset(1, 0)
End With
c.EntireRow.Copy _
Destination:=DestCell
Set c = .FindNext(c)
Loop While Not c Is Nothing And c.Address <> firstAddress
End If
End With
End With
End Sub
Bookmarks