Adapt macro

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

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
 
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
 

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

Similar Threads

Excel VBA 1
Error 1004 in search/copy 3
Formula Array Macro 5
Delete #N/A rows 2
formula does not work in macro 1
Macro independant of workbook 2
Getting rid of "#VALUE!" 1
Change offset to same row... 9

Back
Top