Private Sub Worksheet_Change(ByVal Target As Range)
Dim x
If Target.Address = "$B$1" Then
'列标
x = Sheet1.Range("1:1").Find(Target).Column
x = Left(Cells(1, x).Address(0, 0), 1)
'修改公式
Application.EnableEvents = False
[d2].Formula = "=MIN(结果!" & x & ":" & x & ")"
[F2].Formula = "=MAX(结果!" & x & ":" & x & ")"
[c4:c28].FormulaArray = "=FREQUENCY(结果!" & x & ":" & x & ",B4:B9999)"
[e4].Formula = "=C4/COUNT(结果!" & x & ":" & x & ")"
[e4:e28].FillDown
Application.EnableEvents = True
End If
End Sub (, 下载次数: 32)