Selecting certain cells and pasting down formula

waxb18

Board Regular
Joined
May 31, 2011
Messages
179
My data has some formula which need pasting down.

The data is from Column L through to Q and needs pasting to the bottom of the the data. Ive tried playing around with a "DO" Function mixed in with a "LOOP" but to no avail.

So far this is what ive got:

Range("Q1").End(xlDown).Select
Range("L7572:Q8296").Select

Selection.AutoFill Destination:=Range("L7572:Q8296")
Range("L7572:Q8296").Select

But this will not work tomorrow when i paste new data to the bottom of this one.
Any ideas would be much appreciated
 

Excel Facts

What is the shortcut key for Format Selection?
Ctrl+1 (the number one) will open the Format dialog for whatever is selected.
What do you mean? you have data in L:Q and a formula in R that needs to go to the bottom of the data in L:Q ?

IF so write your formula in R1 then do
Code:
Range("Q1").SELECT
selection.end(xldown).select
activecell.offset(0,1).select
range(selection,selection.end(xlup)).select
selection.filldown
 
Upvote 0
Perhaps like this

Code:
LR = Cells.Find(What:="*", SearchDirection:=xlPrevious, SearchOrder:=xlByRows).Row
Range("L7572:Q7572").AutoFill Destination:=Range("L7572:Q" & LR)
 
Upvote 0
no my data is in A-k and formulae in L-Q

well in that case just change the ranges I just mentioned so

write your formula in L1:q1


Code:
range("k1").select
selection.end(xldown).select
activecell.offset(0,1).select
range(selection,activecell.offset(0,5)).select
range(selection,selection.end(xlup)).select
selection.filldown

assign it to a button or something and click the button to update the formulas.
 
Upvote 0

Forum statistics

Threads
1,224,568
Messages
6,179,595
Members
452,927
Latest member
whitfieldcraig

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