LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Why doesn't this range work?

Overall I'm trying to use a variable to set a range so that I can
autofill based on the number of rows in the spreadsheet.

I've set SprdshtPosition as an interger.


Range("I40000") = "=COUNT(R[-39999]C:R[-1]C)"
SprdshtPosition = (Range("I40000") + "1")
'SprdshtPosition will equal only a number ex:3456

Sprdsht_No_Of_Rows = ("A2:A") & SprdshtPosition
'Sprdsht_No_Of_Rows will = A2:A3456


Why doesn't one of the following work?

Selection.AutoFill Destination:=Range("A2:A") & SprdshtPosition
-or-
Selection.AutoFill Destination:=Range Sprdsht_No_Of_Rows
 
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
CTRL A doesn't work on a range of cells DianeG Excel Discussion (Misc queries) 2 June 4th 07 08:44 PM
Cant get dynamic range formula to work. Mike K Excel Worksheet Functions 2 May 4th 07 11:59 PM
SUBTOTAL(9,range) Does NOT work in AutoFilter Dane Excel Worksheet Functions 5 September 4th 05 06:06 PM
Formatting a range of cells doesn't work Stefi Excel Discussion (Misc queries) 6 August 15th 05 12:21 PM
HELP!! Range selection doesn't work pingger Excel Programming 0 July 28th 03 09:24 PM


All times are GMT +1. The time now is 07:20 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"