View Single Post
  #3   Report Post  
igor
 
Posts: n/a
Default

On Wed, 23 Feb 2005 08:43:46 -0800, "Jason Morin"
wrote:

To sum column B of every worksheet except the current
one, you could use:

Function SumColumnB() As Long
Dim ws As Worksheet
Dim TotalQty As Long
Dim SheetQty As Long
Dim ActiveWSQty As Long
Application.Volatile
ActiveWSQty = Application.Sum(ActiveSheet.[B:B])
For Each ws In ThisWorkbook.Worksheets
SheetQty = Application.Sum(ws.[B:B])
TotalQty = TotalQty + SheetQty
Next
SumColumnB = TotalQty - ActiveWSQty
End Function



Wow, that's perfect. I did have to learn that I have to manually update
the cell to be sure that it is current as I switch between worksheets. But
after that, works fine. Thanks, Jason. -- Igor