Option Explicit
Function AlmostSumAll() As Long
' constants
' declarations
Dim lSum As Long, I As Integer
' start
lSum = 0
' process
For I = 1 To Worksheets.Count
With Worksheets(I)
If .Name <> ActiveWorkbook.Name Then lSum = lSum + .Cells(1, 1).Value
End With
Next I
' end
AlmostSumAll = lSum
End Function
Function AlmostSumAll() As Double
Application.Volatile
Dim lSum As Double
Dim I As Integer
lSum = 0
For I = 1 To Worksheets.Count
With Worksheets(I)
If .Name <> "Main" Then lSum = lSum + .Cells(1, 1).Value
End With
Next I
AlmostSumAll = lSum
End Function