Fill down based on rows in region

R

ronber

Suppose data in A1:F1 and in A1:Asome number

I want to fill code starting in E2 down to Esomenumber.

Suppose the formula is "=MyCode"

How do I go about doing that, given the number of rows may vary and I
want the code to adapt to the number of rows?

TIA
Ron
 
T

Trevor Shuttleworth

Ron

Dim LastRow As Long
LastRow = Range("A65536").End(xlUp).Row
Range("E2:E" & LastRow).Formula = "=MyCode"

Regards

Trevor
 

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