Copying whole lines based on one cell

H

Hankjam

I have a schedule sheet that I want to extract only the lines in which
have "PIP" in the Format column.

I could do it with a filter but that seems pretty messy on line
numbering.

vlookup only seems to extract the first observation.

Any help would be cool.

Thanks

Andrew j
 
D

Don Guillett

Something like this may help with numbering

Sub fillnums()
Range(Cells(2, 1), Cells(1000, 1)).ClearContents
lastrow = ActiveSheet.UsedRange.Rows.Count
j = 1
For i = 2 To lastrow
If Rows(i).Hidden = False Then
Cells(i, 1) = j
j = j + 1
End If
Next
End Sub
 
Top