Autofill multiple formulas in columns down to the last row with data in it in column B - ignores column B entries

armchairandy

Board Regular
Joined
Mar 27, 2012
Messages
53
Hi

I have different formulas in 1106 columns relating to the 1st row (Column B)
There are up to 500 rows where data can be put in. This can lead to a lot of formulas, as I have up to 20 sheets of this.
The 500 rows are not always used, and I do not want unused formulas in the sheets
this is an automatic worksheet used by different users & so I need to automate the results, and not just tell people to darg to the bottom.

So...........

In column B, if there are 10 entries B17 to B26 - I need the formulas autofilled along J17 to AQU17 down to Row 26

I used the below formula, but when I ran it, the macro autofilled past row 26

Range("J17").Select
Range("J17:AQU17").AutoFill Destination:=Range("J17:AQU" & Worksheets("Test").Cells(Rows.Count, "B").End(xlUp).Row)

How do I make it stop at row 26??

Many thanks in advance
 
Mark58

Sorry for the delay, I ran the #4 macro & it came up 26 - I then ran the code I have been using , and it works!. Many thanks for your help, but I still do not know why I was having the problem in the first place.

Andrew
 
Upvote 0

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Mark58

Sorry for the delay, I ran the #4 macro & it came up 26 - I then ran the code I have been using , and it works!. Many thanks for your help, but I still do not know why I was having the problem in the first place.

Andrew

Why do you not understand? You had data in a cell further down column B so the code was working as it should and finding the last cell in the column with data.
 
Upvote 0

Forum statistics

Threads
1,223,907
Messages
6,175,301
Members
452,633
Latest member
DougMo

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