View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
TomPl TomPl is offline
external usenet poster
 
Posts: 342
Default How to use a variable as an argument in .FliiDown

I assume that you defined the variable lastFilledRow as long, then you
include a line of code to give it value (lastFilledRow = code to determine
last filled row).

Then you have all you need to make the fill down work as you have described.
The line of code should read:

Range("StocksFormulas").End(xlDown).Select
Dont know why you are selecting this, not needed for fill down, but maybe
you have another use.

Range("F & lastFilledRow & :O30").FillDown

That should work although I am not sure of what area you are trying to fill.
Note the way variables can be used in defining a range.

Tom