Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
Create a user-defined function SheetSum that loops through the sheets
and sums the relavant ranges. here's the code : Function SheetSum(ByVal InData As Range) As Variant Dim wsCurrent As Worksheet Dim CurSum As Double CurSum = 0 For Each wsCurrent In Worksheets CurSum = CurSum + wsCurrent.Range(InData.Address).Value Next wsCurrent SheetSum = CurSum End Function to call this function to add , for example, the contents of range A2 in all sheets, enter this formula = SheetSum(A2). HTH Fadi www.chalouhis.com/XLBLOG |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
What is the quickest method to insert & name multiple worksheets . | Excel Worksheet Functions | |||
fax multiple worksheets | Excel Worksheet Functions | |||
Extracting data from multiple worksheets into a list | Excel Worksheet Functions | |||
adding certain cells in multiple worksheets in multiple workbooks | Excel Worksheet Functions | |||
Countif with multiple criteria and multiple worksheets | Excel Worksheet Functions |