Sending rows to another sheet based on value of column A

  • Thread starter Thread starter Lindsey M
  • Start date Start date
L

Lindsey M

Hi everyone

I have a worksheet that has 7 colmuns worth of data (it relates to team
managers, of which there are approx 10 (name stored in column A) and other
info regarding there team members.
Each team manager is part of a service, e.g. Joe Bloggs is part of Revenues
so I want all the rows that contain Joe Bloggs in column A to be transferred
to the worksheet named Revenues.
This needs to be done by code, by poss using a Command Button?
Any ideas on this?

As always, help is extremely appreciated!!

Cheers
Lindsey
 
U¿ytkownik "Lindsey M said:
Hi everyone

I have a worksheet that has 7 colmuns worth of data (it relates to team
managers, of which there are approx 10 (name stored in column A) and other
info regarding there team members.
Each team manager is part of a service, e.g. Joe Bloggs is part of Revenues
so I want all the rows that contain Joe Bloggs in column A to be transferred
to the worksheet named Revenues.
This needs to be done by code, by poss using a Command Button?
Any ideas on this?

As always, help is extremely appreciated!!

Cheers
Lindsey

try to use advanced filter
or modify this code

Sub test()
x = InputBox("What data you want to be filtered?")
Range("a2").AutoFilter Field:=1, Criteria1:=x
Selection.CurrentRegion.Copy
Sheets.Add
Range("a1").PasteSpecial xlPasteValues
y = InputBox("Name of sheet")
ActiveSheet.Name = y
Application.CutCopyMode = False
End Sub


mcg
 
Back
Top