title: Consolidate specific sheets from different workbooks into one in sheet
body: <p>I have a single workbook which is edited by 6-7 different people. There are counts given be each person in the sheet and I am looking for a way where I can merge all the sheets and find the sum of the total count. For eg,</p>
  
  <p>This is the sheet in 1st workbook,</p>
  
  <pre><code>A        B          c
  10       15         10
  </code></pre>
  
  <p>The sheet in the 2nd workbook,</p>
  
  <pre><code>A        B          c
  7       10          9
  </code></pre>
  
  <p>And it is similar for all the workbooks. I want the final consolidated one to have the sum of all the values in sheets of each workbook,</p>
  
  <pre><code>A        B          c
  17       25         19
  </code></pre>
  
  <p>I thought one way to do this is to, put all the excel workbooks into a same folder and use the following code to merge it and then use a macro to count it.</p>
  
  <pre><code>Sub GetSheets()
  Path = "C:\Users\username\Downloads\New folder"
  Filename = Dir(Path &amp; "*.xlsx")
    Do While Filename &lt;&gt; ""
    Workbooks.Open Filename:=Path &amp; Filename, ReadOnly:=True
       For Each Sheet In ActiveWorkbook.Sheets
       Sheet.Copy After:=ThisWorkbook.Sheets(1)
    Next Sheet
       Workbooks(Filename).Close
       Filename = Dir()
    Loop
  End Sub
  </code></pre>
  
  <p>But for some reason this code is getting executed without any errors but has no effect in the consolidated workbook. It is not merging the sheets of the remaining workbooks.</p>
  
  <p>Can anybody tell me what is the error I am making here?</p>
  
  <p>Also is there any alternate way to find the consolidated sum?</p>
  
  <p>thanks</p>