Combine Two Different Workbook to the New One

Rahulwork

Active Member
Joined
Jun 9, 2013
Messages
284
Hello Everyone,

Hope all are doing great. Bit new to VBA so I need your help to create code for below situation.

I have an excel where at

F4 - i have a folder path which contains excel files

In F5 i have one excel file name contain in F4 path

- Sample No Match 20200728.xlsx

In F6, i have one more excel file name contain in f4 path

- Sample Yes Match 20200728.xlsx

Now i want my macro to -

1. Go to F4 Path
2. Create New Workbook by name of "Consolidated Sample Today"
3. Copy and paste the data of file in F5 into new workbook
4. Copy and paste the data of file.in F6 after the data of F5 ( Below of that as it has same header)
5. Save and close all workbook in F4 path

Please let me.know.if you need any further information on the same. Your response will.be appreciated

Note - I have to pick file.name from excel only
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)

Forum statistics

Threads
1,214,976
Messages
6,122,541
Members
449,089
Latest member
davidcom

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