ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Fill Problem (https://www.excelbanter.com/excel-programming/356392-fill-problem.html)

Paputxi

Fill Problem
 
Say I have formulas in A1 and B1. I want to write VBA code to fill the
formulas down to, say, row 20 (which will actually be an input value). What
is some VBA code for doing that?

Tom Ogilvy

Fill Problem
 
Sub BBB()
Dim rw As Long
rw = Application.InputBox( _
"Enter row to fill to", Type:=1)
Range("A1:B1").AutoFill _
Destination:=Range("A1:B" & rw)
End Sub

--
Regards,
Tom Ogilvy



"Paputxi" wrote in message
...
Say I have formulas in A1 and B1. I want to write VBA code to fill the
formulas down to, say, row 20 (which will actually be an input value).

What
is some VBA code for doing that?





All times are GMT +1. The time now is 02:31 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com