Macro to auto fill to last row of data

ljuarez

New Member
Joined
Apr 17, 2014
Messages
4
I have a table like this:

651OPTOUT01asdgfa
hsdh
srtjdf
ncxvba
ryjfj
urtyir

<tbody>
</tbody>

I would like to create a macro that will copy and paste A1:B1 all the way to the last row of data. Essentially it will autofill down to the last cell with data in column C. It should copy/paste and not fill the series (651, 652, 653 etc.)
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Why a macro ???
Simply highlight cells A1:B1, hold down the CTRL key and Drag the selected cells down to the bottom ( by the little black square in the bottom RH corner
 
Upvote 0
Why a macro ???
Simply highlight cells A1:B1, hold down the CTRL key and Drag the selected cells down to the bottom ( by the little black square in the bottom RH corner

It does sound as simple as that, but I failed to mention that it's part of a larger macro. I'm having issues with this part. I made is to it would copy to row 200, but the end result looks messy (ocd).

Thanks
 
Upvote 0
Perhaps;

Code:
LR = Cells(Rows.Count, 3).End(xlUp).Row
Range("A2:B2").Resize(LR - 1, 2).Value = Range("A1:B1").Value
 
Upvote 0

Forum statistics

Threads
1,216,116
Messages
6,128,932
Members
449,480
Latest member
yesitisasport

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