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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top