Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim I As Long
Dim Total As Double
I = 5
Do
If Cells(2, I).EntireColumn.Hidden = True Then Total = Total + Cells(2, I).Value
I = I + 1
Loop While Cells(2, I).Value <> ""
Range("C2") = Total
End Sub