Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5
Default Selection AutoFill, Excel 2000 & 2003

Hello,

I have multiple worksheets that I need to add numbers to cells incrementing
them by 1 to multiple columns but I was wondering how you can get the
Selection.AutoFill to begin with 21 in A1 and stop at 3500. This is the code
i've got so far but you have to manually put the destination cell in I would
like to automatically stop?

Range("A1").Select
ActiveCell.FormulaR1C1 = "31"
Range("A2").Select
ActiveCell.FormulaR1C1 = "32"
Range("A1:A2").Select
Selection.AutoFill Destination:=Range("A:A"), Type:=xlFillDefault

Thank you for your help,
jfcby



  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default Selection AutoFill, Excel 2000 & 2003

hi,
Try this code....

Range("A1").FormulaR1C1 = "31"
Range("A2").FormulaR1C1 = "32"
Range("A3").FormulaR1C1 = "33"
Range("A1:A3500").Select 'Selects the range
Selection.DataSeries _
Rowcol:=xlColumns, _
Type:=xlLinear, _
Step:=1, _
Stop:=3500 'Where to stop

Regards
FSt1


"James Cooper" wrote:

Hello,

I have multiple worksheets that I need to add numbers to cells incrementing
them by 1 to multiple columns but I was wondering how you can get the
Selection.AutoFill to begin with 21 in A1 and stop at 3500. This is the code
i've got so far but you have to manually put the destination cell in I would
like to automatically stop?

Range("A1").Select
ActiveCell.FormulaR1C1 = "31"
Range("A2").Select
ActiveCell.FormulaR1C1 = "32"
Range("A1:A2").Select
Selection.AutoFill Destination:=Range("A:A"), Type:=xlFillDefault

Thank you for your help,
jfcby




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
Excel 2003 FAILS, but Excel 2000 SUCCEEDS ??? Richard Excel Discussion (Misc queries) 2 May 13th 23 11:46 AM
Using Excel 2000 VBA Application on Excel 2003 Excel Worksheet Functions 0 August 8th 06 02:36 AM
Upgrade from Excel 2000 to Excel 2003 without MS Office 2003? brigida3 Excel Discussion (Misc queries) 1 January 22nd 06 05:13 PM
Hyperlinks from Excel 2000 dont work anymore in Excel 2003 Agron Shujaku Excel Discussion (Misc queries) 0 January 18th 06 02:21 PM
Excel 2003 crashes loading excel files created Excel 2000 Jeff Lewin Australia Excel Discussion (Misc queries) 0 June 27th 05 04:20 AM


All times are GMT +1. The time now is 02:35 PM.

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

About Us

"It's about Microsoft Excel"