Well, if you're already using VBA you could just add a User Defined Function that sums only visible columns:
Public Function SUMvisible(InputRange As Range)
Application.Volatile
Dim cell As Range
For Each cell In InputRange
If cell.EntireColumn.Hidden <> True Then newsum = newsum + cell
Next
SUMvisible = newsum
End Function
Bookmarks