我对VBA并不熟悉,所以请耐心等待。
我的问题与此链接有关:Double-click autofill - dynamic based on adjacent cell
但是,属性位于另一列(例如E列)。我试过调整代码,但无济于事。
答案 0 :(得分:0)
这对你有用吗?
Sub FillBlanks()
Dim lr As Long
lr = Cells(Rows.Count, "E").End(xlUp).Row 'Assuming Attributes are in Column E
On Error Resume Next
'Assuming you want to fill blanks in column A
With Range("A1:A" & lr).SpecialCells(xlCellTypeBlanks)
.Formula = "=R[-1]C"
.Value = .Value
End With
End Sub