Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
I have some code that copies formulas down 9000 rows, but
the range to copy down will change frequently. Is there a way to prompt the user via an input box for the number of rows they want to copy down, and then do so? As always, TIA. |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Eva
Try this to copy the formula in B1 down Sub test() Dim LastRow As Long LastRow = Application.InputBox("Enter a number", Type:=1) With Worksheets("Sheet1") .Range("B1:B" & LastRow).FillDown End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Eva Shanley" wrote in message ... I have some code that copies formulas down 9000 rows, but the range to copy down will change frequently. Is there a way to prompt the user via an input box for the number of rows they want to copy down, and then do so? As always, TIA. |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Ron, thanks for the quick response. The code works great
and I'm sure I'll use it frequently. Thanks for the help! -----Original Message----- Hi Eva Try this to copy the formula in B1 down Sub test() Dim LastRow As Long LastRow = Application.InputBox("Enter a number", Type:=1) With Worksheets("Sheet1") .Range("B1:B" & LastRow).FillDown End With End Sub -- Regards Ron de Bruin http://www.rondebruin.nl "Eva Shanley" wrote in message ... I have some code that copies formulas down 9000 rows, but the range to copy down will change frequently. Is there a way to prompt the user via an input box for the number of rows they want to copy down, and then do so? As always, TIA. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
automatically copy formulas down columns or copy formulas all the | Excel Worksheet Functions | |||
Prompt for file location and copy data | Excel Discussion (Misc queries) | |||
getting rid of copy/overwrite prompt on Save | Excel Discussion (Misc queries) | |||
Is there a way to setup excel to prompt for a backup copy upon ex. | Excel Discussion (Misc queries) | |||
Range COPY function - how to copy VALUES and not formulas | Excel Programming |