+ Reply to Thread
Results 1 to 2 of 2

Pulling data from multiple spreadsheets using VBA

  1. #1
    Registered User
    Join Date
    03-09-2009
    Location
    NYC
    MS-Off Ver
    Excel 2003
    Posts
    2

    Cool Pulling data from multiple spreadsheets using VBA

    Hi all,

    I recently created 40 identical models (and I use this term very loosely ;P) to track the number of motorcycles created across 40 factories worldwide. The manager at each factory is responsible for filling out a separate spreadsheet each day with the number of motorcycles produced and some other detailed information for that factory.

    Since I will be receiving all these models at the end of the week, I'd like to consolidate a couple pieces of data from within each model in a Summary report I've created without having to open each one individually. I've created a macro to pull, for example, cells A16, B102, C103:C105, etc. from each worksheet to create a consolidated summary.

    I am very close to finishing and just have one problem that I'd like to run by you all: Within the "data pull" logic I tell the VB code to sum multiple cells but for some reason the macro crashes if the cell is empty. Is this a common problem that I should be accounting for? Here's the code in question:

    Please Login or Register  to view this content.

  2. #2
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: Pulling data from multiple spreadsheets using VBA

    We just opened a thread with the title what to avoid in VBA.

    Cells is a property of a worksheet. Therefore I would like to see something like:
    Please Login or Register  to view this content.
    Or

    Please Login or Register  to view this content.
    Having that said:
    Please Login or Register  to view this content.
    Without seeing the content you could be adding strings (is there any restriction in the entered data "Data Validation" for the production managers?


    So
    crashes if the cell is empty
    not normally.

    Of what type is Metric1
    Last edited by rwgrietveld; 02-25-2010 at 04:46 AM.
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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