Excel Automate Copy Paste based on rule

kshivanand21

New Member
Joined
Jan 19, 2022
Messages
7
Office Version
  1. 365
Platform
  1. Windows
I hope you are doing well.
I would like to know code available to automate my process to copy one file to another in excel using VBA from two different folder

First folder contains excel (.CSV) file with name 01-04-2022_Day.csv, 01-04-2022_Night.csv, 02-04-2022_Day.csv, 02-04-2022_Night.csv, & so on

Second folder contains file excel(.xlxs) with 01-04-2022_DS.xlxs, 01-04-2022_NS.xlxs, 02-04-2022_DS.xlxs, 02-04-2022_NS.xlxs and so on.

I want to copy data from

01-04-2022_Day.csv ( c column) to 01-04-2022_DS.xlxs (w column),

01-04-2022_Night.csv ( c column) to 01-04-2022_NS.xlxs (w column),

Process continues for each date

I would be happy to hear from you

Thanks & Regards Shiv
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Forum statistics

Threads
1,223,893
Messages
6,175,248
Members
452,623
Latest member
cliftonhandyman

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