Sub test()
Dim a As String
Dim b As Integer
Dim c As Integer
b = ActiveCell.Row
c = ActiveCell.Column
a = InputBox("请输入起始号码", "输入", "001")
For i = 0 To 198 Step 2
Cells(b + i, c) = a
Cells(b + 1 + i, c) = a
If i < 198 Then
Cells(b + 1 + i, c).AutoFill Destination:=Range(Cells(b + 1 + i, c), Cells(b + 2 + i, c)), Type:=xlFillSeries
a = Cells(b + 2 + i, c)
End If
For H = 0 To 1
Cells(b + i + H, c + 1) = H + 1
Next
Next
End Sub
要得到100以后的数,自己改198这个数
Sub test()
Dim a As String
a = InputBox("请输入起始号码", "输入", "001")
For i = 0 To 198 Step 2
Cells(4 + i, 1) = a
Cells(5 + i, 1) = a
If i < 198 Then
Cells(5 + i, 1).AutoFill Destination:=Range(Cells(5 + i, 1), Cells(6 + i, 1)), Type:=xlFillSeries
a = Cells(6 + i, 1)
End If
For H = 0 To 1
Cells(4 + i + H, 2) = H + 1
Next
Next
End Sub
把上面代码输入新建的模块中,然后运行宏