Copy forumla down
You'll still need to pick out a column that can be used to find that last row to
be filled. Tom used column A.
Sub ABC()
dim LastRow as long
with worksheets("Sheet1")
'change IV to the column that can be used to find that last row
lastrow = .cells(.rows.count,"IV").end(xlup).row
'just repeat this for each set of columns that has formulas
'it can be a single column or multiple columns.
.Range("A1:c1").AutoFill .Range("A1:c1").Resize(lastrow)
.Range("f1").AutoFill .Range("f1").Resize(lastrow)
.Range("AA1:Aq1").AutoFill .Range("Aa1:aq1").Resize(lastrow)
End Sub
Leanne M (Aussie) wrote:
I have a user form for several columns of informaition and I have formulas in
others that I need to calculate with each new entry.
Could someone please advise how I can do this - my s/sheet ranges from A:AQ
and the formulas are in various different columns so there is no suitable
range.
Having read through the previous posts I have found the following post which
seems like it would solve my problem but does not-
Assume the formulas are in row 1
Sub ABC()
Dim rng as Range
Set rng = Cells(Rows.Count, "K").End(xlUp)
Range("L1:N1").AutoFill Range("L1:N1").Resize(rng.Row, 3)
End Sub
--
Regards,
Tom Ogilvy
"WolfgangPD" wrote:
I have a macro set-up to copy information into columns A:K. This information
will change each time. There is a formula in L,M and N. I would like a macro
that would copy the formulas down to the final row of the info in column K.
Any suggestions?
--
Leanne M (Aussie)
(Changed Display name from Leanne)
United Kingdom
(Don''t ask me what an Aussie is doing living in the UK!)
--
Dave Peterson
|