Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Prompt to copy formulas

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Prompt to copy formulas

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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 29
Default Prompt to copy formulas

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
automatically copy formulas down columns or copy formulas all the HowlingBlue Excel Worksheet Functions 1 March 16th 07 11:11 PM
Prompt for file location and copy data Jim G Excel Discussion (Misc queries) 0 February 27th 07 02:47 AM
getting rid of copy/overwrite prompt on Save John Collins Excel Discussion (Misc queries) 2 November 21st 06 11:59 PM
Is there a way to setup excel to prompt for a backup copy upon ex. sonny Excel Discussion (Misc queries) 6 March 8th 05 02:04 AM
Range COPY function - how to copy VALUES and not formulas James Cooke Excel Programming 1 August 21st 03 07:04 PM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"