help with dynamic autofill

Guitarmageddon

Board Regular
Joined
Dec 22, 2014
Messages
159
I have concatenated info from two other columns, in cell A9 and Im having trouble figuring out the VBA to autofill dynamically until the corresponding column B is at its end, which varies. Can anyone assist? This is getting inserted into a larger macro I have.
 

Excel Facts

Who is Mr Spreadsheet?
Author John Walkenbach was Mr Spreadsheet until his retirement in June 2019.
Something like
Code:
   Range("A9", Range("B" & Rows.Count).End(xlUp).Offset(, -1)).FormulaR1C1 = "=rc2&"",""&rc3"
 
Upvote 0
Another way:
Code:
Sub a1077600a()
Dim n As Long
n = Range("B" & Rows.count).End(xlUp).row
Range("A9").AutoFill Destination:=Range("A9:A" & n)
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,028
Messages
6,128,383
Members
449,445
Latest member
JJFabEngineering

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