+ Reply to Thread
Results 1 to 6 of 6

Automating data import from multiple xls files to create 1 data source.

  1. #1
    Registered User
    Join Date
    09-03-2012
    Location
    In a Vortex
    MS-Off Ver
    Excel 2010
    Posts
    16

    Automating data import from multiple xls files to create 1 data source.

    Hi,

    I currently have 1 extract from sharepoint that 6 different departments are using to create multiple reports by adding department specific data and then creating pivot tables/charts. I would like to just take the 6 departments files and copy the relevant values into the main extract so that I can create all pivots and dashboards from a central locations at once. My goal is to create one data source and then use power pivot for my charting needs. Is there just a general vba script that I can use for this purpose? I'd like to create a macro that can automate this function vs. manually performing this task each month. Any assistance that can be provided would be greatly appreciated.

    Thanks!

  2. #2
    Forum Contributor thameem127's Avatar
    Join Date
    04-06-2012
    Location
    Jeddah,Saudi Arabia
    MS-Off Ver
    Excel 2003,Excel 2007
    Posts
    321

    Re: Automating data import from multiple xls files to create 1 data source.

    Check this link http://www.excelforum.com/excel-prog...der-stuck.html

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automating data import from multiple xls files to create 1 data source.

    'WORKBOOKS TO 1 SHEET STACKED
    Here's a macro for collecting data from all files in a specific folder.The parts of the code that need to be edited are colored to draw your attention.


    There are many variations on this scenario and others for you to peruse on the site as a starting point for your similar projects.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  4. #4
    Registered User
    Join Date
    09-03-2012
    Location
    In a Vortex
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Automating data import from multiple xls files to create 1 data source.

    Thanks! I'll take a look.

  5. #5
    Registered User
    Join Date
    09-03-2012
    Location
    In a Vortex
    MS-Off Ver
    Excel 2010
    Posts
    16

    Re: Automating data import from multiple xls files to create 1 data source.

    So I've taken a look at all of the examples. It appears that in the scenarios provided the data in the other sources is all formatted the same (i.e., same number of columns). So, I wanted to add to my initial posting the following information that may be important:

    1)The 6 data sources all include data from the master extract but they each have varying number of columns.
    2)Essentially, people are taking my extract and pulling out their departments data and then adding more columns to begin their analysis. I'd hope to create a macro that could automate the process of adding the new columns from the departmental files to the master and then also append any additional data for each row necessary.

    For example, if I send out a file that contains 400 rows with column A, column B (department code), column C and column D. Users are filtering for their department using column B and extracting the 100 rows that applies to them and then adding additional segmentation data via column E, column F, etc...
    In this scenario I would like for my master file to run a macro that looks across the new department file and add that information in column E and column F into the appropriate place in the 400 rows. There are essential 6 worksheets that this would need to be performed across. There are only a few columns that they all have in common.

    Is this something that can be accomplished or am I attempting the wrong method.

    Thanks.

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Automating data import from multiple xls files to create 1 data source.

    So, merge in coming data from multiple sources into an existing sheet matching existing rows to existing rows.

    That's possibly quite an automation project.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1