VBA code to Combine All Excel Files in a Folder into specific sheet of a Workbook

Avinash_Dubey

New Member
Joined
Jan 3, 2023
Messages
1
Office Version
  1. 365
Platform
  1. Windows
I have to copy data from 15+ workbooks and combine it into a different master workbook. All these 15+ workbooks contain a sheet(tab) named 'Comment' and have same header names for different columns.

The master workbook contains 7 sheets, but I am only interested in sheet ‘Master Comment” as I want to copy the data from 15+ workbooks to this “Master Comment” sheet only. This “Master Comment” sheet also has the same column header name as 15+ workbooks.

All the workbooks are located in a same folder on my desktop.



So, I was wondering if someone could please help me to create a VBA code for this? I'm really new to VBA and would really appreciate your help!



Please let me know if you require any clarification.



Many thanks! =)
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.

Forum statistics

Threads
1,214,925
Messages
6,122,301
Members
449,078
Latest member
nonnakkong

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top