在单元格中,a1值始终在变化。我想跟踪a2中a1的最小值。怎么可能?
答案 0 :(得分:0)
这假设A2中已有一个值:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$A$1" Then
Dim a2val As Variant
Dim a1val As Variant
a2val = Range("$A$2").Value2
a1val = Range("$A$1").Value2
If a1val < a2val Then
Range("$A$2").Value2 = a1val
End If
End If
End Sub