View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Andibevan[_2_] Andibevan[_2_] is offline
external usenet poster
 
Posts: 128
Default Filtering based on row

Hi,

This code will copy all entries relating to Mr Manager to sheet 2 of your
workbook.

It could obviously be tweeked but this is a starting point for you.

Andi

Sub Test()
Dim x As Long
Dim y As Long
y = 1
For x = 1 To 65536

If Cells(x, 16).Value = "Mr Manager" Then
Cells(x, 1).EntireRow.Copy
Sheets("Sheet2").Cells(y, 1).PasteSpecial
y = y + 1
End If
Next x

Application.CutCopyMode = False

End Sub

"BerkshireGuy" wrote in message
oups.com...
I have a worksheet with 100 or more rows of data.

Each row is data for a regional manager and their agency. Each
regional manager can have multiple agencys (in different states for
example) and thus each regional manager can have multiple rows of data.

The worksheet is called Sorted Rankings. The regional manager's name
is in column P.

Can I filter out each regional manager and then copy their records to a
seperate spreadsheet?

Please post any code that might be of help.

Thanks,
Brian