Macro to sum cells from other sheets into one
Closed
                                    
                        maz                    
                                    -
                            Nov 24, 2010 at 05:04 PM
                        
venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Nov 25, 2010 at 04:25 AM
        venkat1926 Posts 1863 Registration date Sunday June 14, 2009 Status Contributor Last seen August 7, 2021 - Nov 25, 2010 at 04:25 AM
        Related:         
- Macro to sum cells from other sheets into one
 - Google sheets right to left - Guide
 - How to copy data from one excel sheet to another - Guide
 - Excel online macro - Guide
 - Excel move data from one sheet to another - Guide
 - Excel run macro on open - Guide
 
1 response
                
        
                    venkat1926
    
        
                    Posts
            
                
            1863
                
                            Registration date
            Sunday June 14, 2009
                            Status
            Contributor
                            Last seen
            August  7, 2021
            
            
                    811
    
    
                    
Nov 25, 2010 at 04:25 AM
    Nov 25, 2010 at 04:25 AM
                        
                    I prsume you want sheet1!a1+sheet2!a1+sheet3!a1 etc 
insert a new sheet and call it "master"
try this macro (the total pops up and also copied in A1 of sheet "master"
            insert a new sheet and call it "master"
try this macro (the total pops up and also copied in A1 of sheet "master"
Sub test()
Dim j As Long, k As Long, tot As Double
j = Worksheets.Count
tot = 0
For k = 1 To j
If Worksheets(k).Name <> "master" Then
tot = tot + Worksheets(k).Range("A1")
End If
Next k
MsgBox tot
Worksheets("master").Range("A1") = tot
End Sub