通过VBA实现 Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Rows.Count > 1 Or Target.Columns.Count > 1 Then Exit Sub End If c = Target.Column n = Application.WorksheetFunction.Sum(Columns(c)) If n = 8 Then ‘如果是要值>=8就跳转,那就改成n>=8 Cells(1, c + 1).Select End If End Sub
通过VBA实现
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target.Rows.Count > 1 Or Target.Columns.Count > 1 Then
Exit Sub
End If
c = Target.Column
n = Application.WorksheetFunction.Sum(Columns(c))
If n = 8 Then ‘如果是要值>=8就跳转,那就改成n>=8
Cells(1, c + 1).Select
End If
End Sub