我把AfterSelRangeChange中的代码改为红色标注代码,想当选中区域列不为数值时统计个数,我这样写个数是统计了,但累计数、平均数、最大最小数都出来了,如何让它只显示个数。
Dim t As Table
RibbonMenu.StatusBar.Message3 = ""
Vars("SysUpdateAggregate") = False
If e.Table IsNot CurrentTable OrElse CurrentTable Is Nothing Then
Return
Else
t = CurrentTable
End If
If t.TopRow = t.BottomRow AndAlso t.LeftCol = t.RightCol Then
Return
End If
For c As Integer = t.LeftCol To t.RightCol
If t.Cols(c).IsNumeric = False Then
RibbonMenu.StatusBar.Message3 = t.Aggregate(AggregateEnum.Count,t.TopRow, t.LeftCol, t.BottomRow, t.RightCol)
End If
Next
Vars("SysUpdateAggregate") = True