Numbering cells in a range
Eh?
That created an error 1004, merged cells must be identically sized
The cells are not merged cells in my range; A6:A26; and they are identical
in size.
--
Regards
Rick
XP Pro
Office 2007
"JLGWhiz" wrote:
See if changing to this Destination will work.
Selection.AutoFill Destination:=Range("A6:A" & Sheets.Count),
Type:=xlFillDefault
"Rick S." wrote:
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
|