Option Explicit Sub ToggleFixedDec() 'David McRitchie, 2004-07-29, code/statusbar.txt (toolbars.htm) ' http://www.mvps.org/dmcritchie/excel/statusbar.htm ' code in McRitchie_toggle Dim FDP As Long With Application If .FixedDecimal Then .FixedDecimal = False MsgBox "Fixed Decimal Turned OFF, by your command" Else .FixedDecimal = True MsgBox "Fixed Decimal Turn ON (Places=" _ & .FixedDecimalPlaces & ")" End If End With End Sub Sub Statusbar_simulation() Dim str As String, strcnt As String, strx As String, strcnta As String If Application.Count(Selection.SpecialCells(xlCellTypeVisible)) >= 1 And _ Application.CountA(Selection.SpecialCells(xlCellTypeVisible)) > 1 Then str = "SUM=" & Application.Sum(Selection.SpecialCells(xlCellTypeVisible)) _ & " on Status Bar" strcnt = "Count Nums=" & _ Application.Count(Selection.SpecialCells(xlCellTypeVisible)) _ & " on Status Bar" strcnta = "Count=" & _ Application.CountA(Selection.SpecialCells(xlCellTypeVisible)) _ & " on Status Bar" strx = Chr(10) & " Average=" & _ Application.Sum(Selection.SpecialCells(xlCellTypeVisible)) _ / Application.Count(Selection.SpecialCells(xlCellTypeVisible)) _ & Chr(10) & " Count=" & Application.CountA(Selection. _ SpecialCells(xlCellTypeVisible)) _ & Chr(10) & " Count Nums=" & Application.Count(Selection. _ SpecialCells(xlCellTypeVisible)) _ & Chr(10) & " Max=" & Application.Max(Selection. _ SpecialCells(xlCellTypeVisible)) _ & Chr(10) & " Min=" & Application.Min(Selection. _ SpecialCells(xlCellTypeVisible)) _ & Chr(10) & " Sum=" & Application.Sum(Selection. _ SpecialCells(xlCellTypeVisible)) _ & Chr(10) & " Status Bar reporting reflects visible cells when filtered." Else str = "Nothing would be reported for SUM=" strcnt = "Nothing would be reported for Count Nums=" strx = "Nothing would be reported on Status Bar" End If MsgBox "Actual Values:" & Chr(10) _ & Application.Sum(Selection.SpecialCells(xlCellTypeVisible)) _ & " Calculated SUM" _ & ", " & str & Chr(10) _ & Application.Count(Selection.SpecialCells(xlCellTypeVisible)) _ & " Numeric count" _ & ", " & strcnt & Chr(10) _ & Application.CountA(Selection.SpecialCells(xlCellTypeVisible)) _ & " Nonblank count" _ & ", " & strcnta & Chr(10) _ & Application.CountA(Selection.SpecialCells(xlCellTypeVisible)) _ - Application.Count(Selection.SpecialCells(xlCellTypeVisible)) _ & " text count" & Chr(10) & Chr(10) _ & "Status Bar Reporting (depends on choice):" & strx End Sub