Automate formula placement in entire column

Joshua McNichols

New Member
Joined
Mar 22, 2013
Messages
30
The way I work, I have to repeatedly drag formulas down as I delete rows of data at a time. Sometimes I forget, and this introduces errors into my work. I would like to automate this simple, repetetive process so that every cell in for example Column H (except for a single header row) would include the same formula, all the way down to infinity. So for example, H2 contains the formula =H1+1, H3 contains the formula H2+1, etc. This is not my actual formula, but just an example.
 

Excel Facts

Return population for a City
If you have a list of cities in A2:A100, use Data, Geography. Then =A2.Population and copy down.
Hey,
It's very simple only three lines of
Code:
Sub CopyFormula()
Range("h2").Select
Selection.AutoFill Destination:=Range("h2:h15000"), Type:=xlFillDefault
Range("h1").Select
End Sub

ZAX
 
Upvote 0
What version are you on? Convert it into a table, the formulas will automatically populate in every row of the table. It also solves the problem of relative cell references, you'll almost never have to use F4 to lock a cell reference again. I convert almost everything into a table, it is much, much easier to work with.
 
Upvote 0

Forum statistics

Threads
1,214,518
Messages
6,119,985
Members
448,935
Latest member
ijat

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