Sub macro()
Dim i As Double
Dim j As Integer
Dim ActiveRows As Double
For i = 1 To 1000000
If Sheets("Sheet1").Cells(i + 1, 3).Value <> "" Then
ActiveRows = ActiveRows + 1
Else
Exit For
End If
Next i
For i = 1 To 10
For j = 1 To ActiveRows
If Sheets("Sheet1").Cells(j + 1, i + 2) = "" Then
Sheets("Sheet1").Cells(j + 1, i + 2) = "UNREPORTED"
End If
Next j
Next i
End Sub
1 回答
我认为这可能会有所帮助,请记住更改工作表的名称 . 最好将宏保存在模块中