Autofill Formula To Specific Column

temerson

New Member
Joined
Apr 22, 2019
Messages
39
I currently have this:

Dim lastrow As Long
Dim lastcol As Long


Sheets("Template").Select
Range("v13").Select


lastrow = Range("S" & Rows.Count).End(xlUp).Row
lastcol = Range(11, Columns.Count).End(xlToLeft).Column
Range("V13").Formula = "FORMULA HERE"
Range("V13").AutoFill Destination:=Range("V13:V" & lastrow)



Range("V13:V" & lastrow).Select




ActiveSheet.AutoFilterMode = False





End Sub

I have to autofill the formula right to a specific column.

The end goal is to autofill a matrix: down to the last row, then to a specific column. The part I am stuck on is autofilling the formula to the right with "Range("V13:V" & lastrow).Select"

Thanks guys!
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
How about
Code:
Sub temerson()
   Dim lastrow As Long
   Dim lastcol As Long
   
   lastrow = Range("S" & Rows.Count).End(xlUp).Row
   lastcol = Cells(11, Columns.Count).End(xlToLeft).Column
   Range("V13", Cells(lastrow, lastcol)).Formula = "your formula"
End Sub
 
Upvote 0
You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,223,893
Messages
6,175,239
Members
452,621
Latest member
Laura_PinksBTHFT

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top