Pasting

  • Thread starter Thread starter Raman325
  • Start date Start date
R

Raman325

Hi,

I'm having a problem copying a range from one sheet and copying it t
the next. To give you an idea of what I'm doing, I have filtered ou
results from a spreadsheet and am trying to copy these results to th
next sheet using the following code:


Code
-------------------
Worksheets(1).Range("A1:S" & Worksheets(1).UsedRange.SpecialCells(xlCellTypeLastCell).Row).AutoFilter _
Field:=1, Criteria1:=groups(i1), VisibleDropDown:=False
Worksheets(1).Range("A2:S" & Worksheets(1).UsedRange.SpecialCells(xlCellTypeLastCell).Row).Copy
Worksheets(2).Activate
Worksheets(2).Cells(currRow, "A").Past
-------------------

(This is part of a bigger macro)

When I run the macro, however, I get that the Object doesn't suppor
the method. Am I using the wrong method?

Thanks in advanc
 
Perhaps this way:

Worksheets(1).Range("A1").CurrentRegion.Resize(,19).AutoFilter _
Field:=1, Criteria1:=groups(i1), VisibleDropDown:=False
Worksheets(1).AutoFilter.Range.Copy
Worksheets(2).Activate
Worksheets(2).Cells(currRow, "A").Paste
 

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