If a macro solution would be acceptable, here is one that should work nicely
for you. Simply put the starting number in a cell, then select from that
cell to the last cell you want to put your serial number in, and finally run
the macro.
Sub FillDownWithDecimals()
Dim X As Long, W As String, F As String, S As String
S = Selection(1).Text
W = Int(S) 'Left(S, InStr(S & ".", ".") - 1)
F = Mid(S, InStr(S & ".0", ".") + 1)
For X = 0 To Selection.Count - 1
With Selection(1).Offset(X)
.NumberFormat = "@"
.HorizontalAlignment = xlRight
.Value = W & "." & F
End With
F = CStr(Val(F + 1))
Next
End Sub
Note: The macro changes the format of the selected cells to text (in order
to preserve trailing zeroes) and then right-aligns the text within the cell.
--
Rick (MVP - Excel)
"NEWER USER" <(E-Mail Removed)> wrote in message
news:7E157B5B-4132-4161-935B-(E-Mail Removed)...
>I am very new to Excel and am trying to automate a process. I have a
> worksheet with 4 columns and 60,000 rows.
> Column A Group
> Column B Part No
> Column C Sales
> Column D Rank
>
> I would like to sort the worksheet on Column A (ascending) and then Column
> C
> (descending). From here, I would like to Autofill Column D beginning with
> 1
> to N and each time the Group changes, start again with 1 to N. Any help
> in
> getting me started would be appreciated. Thanks
|