答案 0 :(得分:1)
尝试使用
Public Sub FillBlanks()
Dim rng As Range
Dim c As Range
With ActiveSheet
Set rng = .Range(.Cells(1, "H"), .Cells(.Cells(.Rows.Count, "B").End(xlUp).Row, "H"))
End With
For Each c In rng.SpecialCells(xlCellTypeBlanks)
If IsEmpty(c.Offset(0, Columns("B").Column - c.Column)) Then c.Value2 = c.Offset(-1, 0).Value2
Next c
End Sub