VBA Macro to extract data from every file in a folder and copy data into the open workbook

snmarar

New Member
Joined
Feb 19, 2019
Messages
5
Hi All,

I am looking to write a VBA code,

  • to extract a couple of cells, DATE and AMOUNT, from each workbook in a folder
  • cells containing DATE and AMOUNT are located in "Sheet 1" of each workbook, in cells C4 and G8
  • workbook names are similar in nature, for example “F1 JAN 02.xlsx”
  • finally, copy and paste DATE and VALUE in
    cells A4 and B4 respectively in
    Sheet 1 of the open workbook “Summary.xlsx”

Your assistance in this is greatly appreciated.

Thanks and regards,
Sanjeev.
 

Excel Facts

Select a hidden cell
Somehide hide payroll data in column G? Press F5. Type G1. Enter. Look in formula bar while you arrow down through G.
Thank you for your response.

Apologies, I should have provided you more details.

Basically, each workbook has a sheet with a set of dates and corresponding amounts. Workbooks reside in a folder. That is, Sheet 1 has A4:A10 with dates and B4:B10 with amounts.

I want to copy dates and amounts from each workbook and copy them to an open workbook.

Hope this helps.

Thanks and regards.

So as well as C4 and G8 you'd like A4:B10 copying over too?

Would these go after C4 & G8?
 
Upvote 0

Forum statistics

Threads
1,216,052
Messages
6,128,509
Members
449,455
Latest member
jesski

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