(Solved) – Sum different ranges

(solved)-–-sum-different-ranges

I have a lot of sheets in a workbook named SomethingA – Resources
SomethingB – Resources
SomethingC – Resources
etc……………….

I am trying to sum a specific range inside every one of these sheets which will change variable before the dash in the name and the amount of sheet will change. I would like the sum to appear in a sheet called “Resources” which i the first sheet in the workbook. My code so far:

Sub sumdata1()

  For Each Sht In ThisWorkbook.Worksheets
            If Sht.Name Like "- Resources*" Then
          For Each cell In Range("G11:G46")
            Sheets("Resources").Range(cell.Address) = Sheets("Resources").Range(cell.Address)   Sheets(i).Range(cell.Address)
          Next cell
          End If
        Next
        End Sub

Could appreciate some help.
Be safe!

Leave a Reply

Your email address will not be published. Required fields are marked *