答案 0 :(得分:0)
您可以使用此代码。 只需根据您的需要更改常量。
Const SourceColumn As String = "G"
Const DestColumn As String = "L"
Const TotalCell As String = "H4"
Const StartRow As Integer = 11
Dim i As Long
i = StartRow
For i = StartRow To UsedRange.Cells(UsedRange.Cells.Count).Row
Range(DestColumn & i).Clear
Next i
While Range(SourceColumn & i).Value <> vbNullString
Range(DestColumn & i).Formula = "=(" & SourceColumn & i & "/" & TotalCell & ")*100"
i = i + 1
Wend