LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 14
Default Help with Dynamically changing Range in Excel Macro

I have a macro that contains the following code:

Range("R2").Select
ActiveCell.FormulaR1C1 = "=VALUE(RC[-1])"
Range("R2").Select
Selection.AutoFill Destination:=Range("R2:R1006")

What I am doing is simply creating a formula in cell R2 (it will
always be in R2) and then auto filling to the last populated row. I am
struggling on how to change the part of the code that says
"Range("R2:R1006")". Every time this macro runs the number of rows
will not be 1006. How is it that I change this? TIA



John

 
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
dynamically changing text color Dave Excel Worksheet Functions 4 May 31st 07 06:38 PM
changing selections dynamically [email protected] Excel Discussion (Misc queries) 1 August 22nd 06 04:23 PM
Dynamically Generated Range using Macro [email protected] Excel Worksheet Functions 2 July 15th 06 08:12 AM
How do I set up a formula with a changing range in an excel macro cinvic Excel Discussion (Misc queries) 2 April 4th 06 10:39 PM
Pivottable - dynamically changing the range of cells Todd1 Excel Discussion (Misc queries) 1 March 28th 06 06:22 PM


All times are GMT +1. The time now is 07:17 PM.

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"