Need to copy rows in Sheet1 to different worksheets

  • Thread starter Thread starter minx2001
  • Start date Start date
M

minx2001

I tried it and get the following error:

Run-time error '9' :
Subscript out of range

Please help (sorry about this, but as I said, I am completely new t
this).

Thank
 
Hi

Set ws1 = Sheets("Sheet1")

Sheets("Sheet1") is the sheet with the data
If the sheet with the data not exist you get a error 9


Use a range like this
Set rng = ws1.Range("A1:G100")

The names in the is example must be in column A
If not change this line
rng.Columns(1).AdvancedFilter _

To
rng.Columns(3).AdvancedFilter _
If the names are in column C
 

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