Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
numbering cells | Excel Discussion (Misc queries) | |||
Numbering a Range Using Autofilter | Excel Discussion (Misc queries) | |||
Auto numbering cells | Excel Programming | |||
Merged cells numbering | Excel Programming | |||
How do I set up auto-numbering on cells? | Excel Programming |