Macro to copy formula based on range of other column

A

Angus Beaumont

I have a user input column (A:A) where the user puts in Product name
there are then several formulas in B2, C2, D2, Etc and I want to run
a macro that will copy those down to as far as the data extends in
column A. i.e if the product name runs to A10 the user can then press
a button and all formulas will copy down to B10, C10, D10, etc.

Or is there a better way of doing this?

thank you
 
I

isabelle

hi Angus,

lastrow = Range("A65536").End(xlUp).Row
Range("B2:E2").AutoFill Destination:=Range("B2:E" & lastrow), Type:=xlFillDefault


--
isabelle



Le 2012-05-04 05:41, Angus Beaumont a écrit :
 
A

Angus Beaumont

hi Angus,

lastrow = Range("A65536").End(xlUp).Row
Range("B2:E2").AutoFill Destination:=Range("B2:E" & lastrow), Type:=xlFillDefault

PERFECT....Thank you
 

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

Top