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

Hi Guys,

I simply want to adapt this formula to copy across rather than down, I
have changed it to -

Dim rng as Range
set rng = Range(cells(2,1),cells(2,1).End(xlToRight))
rng.offset(0,1).Formula = Cells(2,2).Formula

I'm getting an Application Defined or Object Defined Error on this
code -

rng.offset(0,1).Formula = Cells(2,2).Formula

Any advice would be great!

Thanks
Paul
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,872
Default Adapt macro

Hi Paul,

Am Tue, 3 May 2011 07:39:31 -0700 (PDT) schrieb Paul:

rng.offset(0,1).Formula = Cells(2,2).Formula


try:
Cells(2, 2).AutoFill Destination:=rng


Regards
Claus Busch
--
Win XP PRof SP2 / Vista Ultimate SP2
Office 2003 SP2 /2007 Ultimate SP2
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
To adapt macro for relative lines PST Excel Programming 4 May 25th 07 06:26 AM
how can i adapt this formula? Gary Keramidas[_2_] Excel Programming 5 July 15th 05 08:51 PM
adapt macro monty Excel Worksheet Functions 3 March 9th 05 12:44 PM
Please help me to adapt this code. Rob Hargreaves Excel Programming 1 February 2nd 05 08:27 PM
Trying to adapt progress meter hotherps[_144_] Excel Programming 0 October 17th 04 02:46 PM


All times are GMT +1. The time now is 11:23 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"