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

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.

Forum statistics

Threads
1,224,823
Messages
6,181,170
Members
453,021
Latest member
Justyna P

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