The code pastes the information into a new worksheet.
Whatever row it appears in the original is where it appears in the new worksheet.
How do I paste to the beginning of the new worksheet?
Sub CloverLeafLocal048488()
Dim xRg As Range
Dim XCell As Range
Dim A As Long
Dim B As Long
A = Worksheets("OriginalDataPull").UsedRange.Rows.Count
B = Worksheets("CloverLeafLocal-048488").UsedRange.Rows.Count
If B = 1 Then
If Application.WorksheetFunction.CountA(Worksheets("CloverLeafLocal-048488").UsedRange) = 0 Then B = 0
End If
Set xRg = Worksheets("OriginalDataPull").Range("X1:X" & A)
On Error Resume Next
Application.ScreenUpdating = False
For X = 1 To xRg.Count
If CStr(xRg(X).Value) = "048488" Then
xRg(X).EntireRow.Copy Destination:=Worksheets("CloverLeafLocal-048488").Range("A" & X + 1)
B = X + 1
End If
Next
Application.ScreenUpdating = True
End Sub