Importing data from one workbook to another, based on the month

schmo95

New Member
Joined
May 27, 2015
Messages
3
I'm still relatively new to VBA so could really appreciate some help!

There are a few conditions i need to be fulfilled so i'll do my best to cover everything! I have a table in my Master work book, an example of which I have given below (there are hundreds of rows in reality). I manually have to update this on a monthly basis with the new months figures (a long copy and paste job). The new monthly figures are emailed to me in 5 separate workbooks. In the example, the number is an example of which workbook the data is coming from, ie 1a from the first workbook i receive, 2 from the 2nd workbeek etc etc.

The idea is that i will save these files locally (with the naming convention Workbook 1 - Jun-15, Workbook 2 - Jun-15), then have a macro in place so i can press a button and 'update' the master spreadsheet. The macro will then import the appropriate data (based on the month) from the workbooks received into the appropriate columns (again, correct month) in the Master work book. The difficulty is that the column the file which needs to be update changes each month, hence i need the code to recognize which month the data is for and update the appropriate column. I was thinking that i could maybe use the naming convention of the files to identify the correct column to update to? Although if there is a better suggestion i'm welcome to ideas.

Hopefully this is enough info, if I've missed anything out i'll be happy to answer questions. If anyone has any ideas the help would be greatly appreciated :)

ServiceJun-15Jul-15Aug-15Sep-15Oct-15
example 1a99%97%
example 1b100%85%
example 1c99%99%
example 2a90%100%
example 2b100%100%
example 3a100%100%
example 3b100%100%
example 3c100%99%
example 4a100%87%
example 5a100%98%
example 5b100%100%

<tbody>
</tbody>
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,214,925
Messages
6,122,303
Members
449,078
Latest member
nonnakkong

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