Get data from another excel files which sit on the server folder, based on the date value in the current excel file.

a24425311

New Member
Joined
Dec 27, 2022
Messages
1
Office Version
  1. 365
Hi guys,

I am still Googling to see if there is a better way to do this.

I have a local excel file and would like to build a VBA code to copy data from an excel file that currently sits on the local server.

Data Fetching Criteria:
Based on the Date (Month) value in cell G2 (sheet1 in local excel), if G2 is 22-Dec-2022, it will look for the folder Dec_2022, copy data from Dec_Record.xlsx and paste data to the local excel (sheet2 in local excel).

Copy Data:
Copying only Colum G, I, J, U, V, W & X and paste multiply (to avoid stored as text error) to the local excel file Colum A, B, C, D, E, F & G

Files path (Server)
Root
|_Sept_2022
|_Sept_Record.xlsx
|_Oct_2022
|_Oct_Record.xlsx
|_Nov_2022
|_Nov_Record.xlsx
|_Dec_2022
|_Dec_Record.xlsx

*These files are constantly updated


Thank you in advanced
 

Excel Facts

Copy PDF to Excel
Select data in PDF. Paste to Microsoft Word. Copy from Word and paste to Excel.

Forum statistics

Threads
1,223,699
Messages
6,173,907
Members
452,536
Latest member
Chiz511

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