Autofill active cell down to how far Column A goes

Tardisgx

Board Regular
Joined
May 10, 2018
Messages
81
The code below has the range defined and says pull down a2:a as far as column A on the sheet called data goes.

Range("a2:a" & Sheets("Data").Range("A" & Rows.Count).End(xlUp).Row).filldown


I have selected a column by the header contents not the position and then offset the selection by 1 so I have the 2nd cell of the relevant column selected.

I would like to pull this cell down as far as column A goes. This is all occurring on the same sheet
 

Excel Facts

How to calculate loan payments in Excel?
Use the PMT function: =PMT(5%/12,60,-25000) is for a $25,000 loan, 5% annual interest, 60 month loan.
Re: How to autofill active cell down to how far Column A goes

I have made some progress; the code below fills down the active cell 1 cell past how far column A goes.

ActiveCell.Range("A1:A" & Sheets("Sheet1").Range("A" & Rows.Count).End(xlUp).Row).FillDown
 
Upvote 0
Re: How to autofill active cell down to how far Column A goes

How about
Code:
ActiveCell.Range("A1:A" & Range("A" & Rows.Count).End(xlUp).Row-1).FillDown
 
Upvote 0
Re: How to autofill active cell down to how far Column A goes

The data i'm pulling down is just the same value which is why i did the following.

Well that works better than making the 1st row heading be pulled down then find & replace all that from the 2nd row lol thank you
 
Upvote 0
Re: How to autofill active cell down to how far Column A goes

You're welcome & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,834
Messages
6,121,873
Members
449,056
Latest member
ruhulaminappu

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