Select Range - Fill Down

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am trying to select a cell and use that as the beginning of a range to 31
columns to the right and then go up and fill down equations that are in row 2.

Here's what i have so far...
Range("A2").Select
Selection.End(xlDown).Offset(0, 38).Select
ActiveCell.Offset(0, 31).Select
Range(Selection, Selection.End(xlUp)).Select
Selection.FillDown

So I start in cell A2 go down to the last record and move over 38 columns
and from then i need to select that cell and 31 cells to the right and fill
down from row 2.

Hope that makes sense and thanks in advance.

Ak
 
I like to use a variable to represent my range:

Option Explicit
Sub testme01()

Dim myRng As Range

With ActiveSheet
Set myRng = .Range("a2", .Range("a2").End(xlDown)).Resize(, 31)
End With

myRng.FillDown

End Sub

But this worked ok for me, too:

Option Explicit
Sub testme01A()
With ActiveSheet
.Range("a2", .Range("a2").End(xlDown)).Resize(, 31).FillDown
End With
End Sub

I went from A:AE
Change that 31 to 32 if you meant A:AF.
 

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

Back
Top