#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Pasting


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(xlCellTypeLas tCell).Row).AutoFilter _
Field:=1, Criteria1:=groups(i1), VisibleDropDown:=False
Worksheets(1).Range("A2:S" & Worksheets(1).UsedRange.SpecialCells(xlCellTypeLas tCell).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

--
Raman32
-----------------------------------------------------------------------
Raman325's Profile: http://www.excelforum.com/member.php...fo&userid=2474
View this thread: http://www.excelforum.com/showthread.php?threadid=54256

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default Pasting

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

--
Regards,
Tom Ogilvy


"Raman325" wrote:


Hi,

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


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

(This is part of a bigger macro)

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

Thanks in advance


--
Raman325
------------------------------------------------------------------------
Raman325's Profile: http://www.excelforum.com/member.php...o&userid=24748
View this thread: http://www.excelforum.com/showthread...hreadid=542563


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
pasting David Gerstman Excel Worksheet Functions 2 July 13th 07 08:02 PM
Pasting help Ambrosia[_6_] Excel Programming 6 November 21st 05 03:25 AM
Pasting on Filtered Data Sheets without pasting onto hidden cells CCSMCA Excel Discussion (Misc queries) 1 August 28th 05 01:22 PM
Pasting numbers and formulas without pasting format. Dan Excel Discussion (Misc queries) 3 March 27th 05 03:47 AM
Pasting Q John Excel Programming 4 June 6th 04 08:03 PM


All times are GMT +1. The time now is 07:34 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"