Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default Please help to copy in a range


I given the following command to copy in a range upto end of the column of
that cell in a macro. the error message is 'Autofill mathod range class
failed ' given by the system
But it is not working . Please help me with correct command

Selection.AutoFill Destination:=Range("O2:O" & Cells(Rows.Count,
"O").End(xlUp).Row)
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Please help to copy in a range

Hi,

You must copy the range before filling. Try this

Selection.Copy Destination:=Range("O2:O" & Cells(Rows.Count,
"O").End(xlUp).Row)

Mike

"pol" wrote:


I given the following command to copy in a range upto end of the column of
that cell in a macro. the error message is 'Autofill mathod range class
failed ' given by the system
But it is not working . Please help me with correct command

Selection.AutoFill Destination:=Range("O2:O" & Cells(Rows.Count,
"O").End(xlUp).Row)

  #3   Report Post  
Posted to microsoft.public.excel.misc
pol pol is offline
external usenet poster
 
Posts: 129
Default Please help to copy in a range

thanks a lot


"pol" wrote:


I given the following command to copy in a range upto end of the column of
that cell in a macro. the error message is 'Autofill mathod range class
failed ' given by the system
But it is not working . Please help me with correct command

Selection.AutoFill Destination:=Range("O2:O" & Cells(Rows.Count,
"O").End(xlUp).Row)

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 383
Default Please help to copy in a range



"Mike H" wrote:

Hi,

You must copy the range before filling. Try this

Selection.Copy Destination:=Range("O2:O" & Cells(Rows.Count,
"O").End(xlUp).Row)

Mike

"pol" wrote:


I given the following command to copy in a range upto end of the column of
that cell in a macro. the error message is 'Autofill mathod range class
failed ' given by the system
But it is not working . Please help me with correct command

Selection.AutoFill Destination:=Range("O2:O" & Cells(Rows.Count,
"O").End(xlUp).Row)

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
RANGE EXCEL copy cell that meets criteria in a range confused Excel Worksheet Functions 3 March 27th 08 01:41 PM
copy range and paste into every 3rd cell of new range thomsonpa New Users to Excel 4 December 3rd 07 01:47 PM
Copy Used Range billinr Excel Discussion (Misc queries) 4 February 27th 07 07:00 PM
copy a specified name range Lori New Users to Excel 9 January 10th 07 01:13 PM
How do I copy formulas but using the same range each time I copy Laffin Excel Worksheet Functions 2 June 22nd 06 04:17 PM


All times are GMT +1. The time now is 09:20 PM.

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"