Copying data based on ws name

struf

Board Regular
Joined
Jul 2, 2002
Messages
107
I need to copy data from one wb with multiple ws to another wb based on the name of the ws

First wb has 50 ws, one for each state. EX: C:\ qtr1.xlsx

In another folder, i have 50 wb , again one for each state (EX: C:\2011\ AL.xlsx), which happens to have 4 ws

I would like to copy the data on each individual in C:\ qtr1.xlsx to the appropriate wb in

C:\2011, and to make it more interesting, I need it copied to the second tab , let's call it "supplies". The Supplies tab is the same in each Wb

Now because I do not want to have to open each wb, i have found several macros that will open and close these wb once i find another macro to do all the copying. So i am not worrying about that at this time

I have tried looking at lookups, indirects, etc, but to tell you the truth, i don't even know where to start anymore.

While an answer to my problem would be fantastic, I would be very happy to get any sort of guidence so i can continue to research it.

Many thanks in advance. ANy direction is extremely appriciated.

Regards,

struf
 
Last edited:
What's the problem with the data?

Like I said the copying part of the code was pretty simple.

If you need something more involved post details - I think that's what the main point of your original question was anyway.:)
 
Upvote 0

Excel Facts

Copy formula down without changing references
If you have =SUM(F2:F49) in F50; type Alt+' in F51 to copy =SUM(F2:F49) to F51, leaving the formula in edit mode. Change SUM to COUNT.

Forum statistics

Threads
1,224,595
Messages
6,179,798
Members
452,943
Latest member
Newbie4296

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