Sub ki129() 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 Range(Cells(cely, celx), Cells(cend, celx)).Select Selection.DataSeries Rowcol:=xlColumns, Type:=xlLinear, _ Date:=xlDay, Step:=1, Trend:=False End Sub