Sub ki128() cely = ActiveCell.Row celx = ActiveCell.Column msg = cely & "行  " & celx & "列を1番として下方向へ番号を付けます" & Chr$(10) & _ "(指定された列の内容は番号で上書きされます)" msg1 = MsgBox(msg, 1, "消去確認") If msg1 = 2 Then Exit Sub End If ActiveCell.SpecialCells(xlLastCell).Select cend = ActiveCell.Row Cells(cely, celx) = 1 Cells(cely, celx).Select Selection.AutoFill Destination:=Range(Cells(cely, celx), _ Cells(cend, celx)), Type:=xlFillSeries End Sub