SUMVISIBLE
SUMVISIBLE(rgeValues)
Returns the total value of the numbers in cells that are visible
| rgeValues |
REMARKS
* This function excludes hidden cells caused by AutoFilter, Grouping or that have been Manually Hidden.
* You can use the built-in SUM function to include hidden cells.
* You can use the user defined SUMVISIBLEIFS function to
* Similar to the user defined functions AVERAGEVISIBLE, COUNTVISIBLE, MAXVISIBLE, MEDIANVISIBLE and MINVISIBLE
* also ' =AGGREGATE(9,5,B3:B12)
* This page is the equivalent JavaScript function.
Public Function SUMVISIBLE( _
ByVal rgeValues As Range) _
As Double
Dim dbtotalvalue As Double
Dim rgeCell As Range
Application.Volatile
dbtotalvalue = 0
For Each rgeCell In rgeValues
If (rgeCell.EntireRow.Hidden = False) And _
(rgeCell.EntireColumn.Hidden = False) Then
dbtotalvalue = dbtotalvalue + rgeCell.Value
End If
Next rgeCell
SUMVISIBLE = dbtotalvalue
End Function
For instructions on how to add this function to a workbook refer to the page under Inserting Functions
© 2026 Better Solutions Limited. All Rights Reserved. © 2026 Better Solutions Limited TopPrevNext