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: 213
Default Numbering cells in a range

I am trying to figure out how to number cells in a range in a numerical
ascending order. By recording a macro I can see how its done on one sheet.
'=====
Range("A6").Select
ActiveCell.FormulaR1C1 = "1"
Selection.AutoFill Destination:=Range("A6:A26"), Type:=xlFillDefault
'=====
If I change ActiveCell.FormulaR1C1 = "1" to ActiveCell.FormulaR1C1 = MyVar
the numbering sequence stops and only repeats the value of MyVar in each
cell. The reason I need a variable is I wont know the number of sheets in
the workbook and I need to number the cells 1 thru 21 and adding 21 for each
sheet to continue numbering.

--
Regards

Rick
XP Pro
Office 2007

 
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
numbering cells Soth Excel Discussion (Misc queries) 3 December 4th 09 05:41 PM
Numbering a Range Using Autofilter tanya Excel Discussion (Misc queries) 3 June 19th 06 03:40 PM
Auto numbering cells RichieRich Excel Programming 1 March 7th 05 09:28 AM
Merged cells numbering Imagino Excel Programming 1 February 7th 05 01:18 PM
How do I set up auto-numbering on cells? Benson Excel Programming 2 November 16th 04 03:02 PM


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