+ Reply to Thread
Results 1 to 8 of 8

Pulling data from several workbooks to single Master workbook

  1. #1
    Registered User
    Join Date
    05-15-2009
    Location
    Springfield Missouri
    MS-Off Ver
    Excel 2003
    Posts
    46

    Pulling data from several workbooks to single Master workbook

    I know there are about a thousand of these floating around on here but I cannot seem to find one that helps. Here is what I have so far


    Please Login or Register  to view this content.
    This is the error that I get when I try to run it
    Run-time error '1004':
    Application-defined or object defined error

    I am trying to pull data from "Copy Recap" B4:B44 and put it in "Book 1" B4:B44 of the other workbook. I have no idea if the names are right in that code or not, it is just something that I found on here from February of last year.

    thanks for the help

  2. #2
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Pulling data from several workbooks to single Master workbook

    What do you have in cells M1 and M2 as that is where it is expecting to find the names of the other workbooks.
    Also are the other workbooks actually located at "C:\Documents and Settings\leaxl49\Desktop" ?
    Also you will need another path seperator between the path and the workbook name in this line:
    Please Login or Register  to view this content.
    So it becomes:
    Please Login or Register  to view this content.
    If you find the response helpful please click the scales in the blue bar above and rate it
    If you don't like the response, don't bother with the scales, they are not for you

  3. #3
    Registered User
    Join Date
    05-15-2009
    Location
    Springfield Missouri
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Pulling data from several workbooks to single Master workbook

    There is nothing in M1 or M2 in any of the workbooks.
    The workbooks are located throughout our server.
    And
    Workbooks.Open Filename:=Pathname & "\" & Mybook
    didnt do anything

  4. #4
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Pulling data from several workbooks to single Master workbook

    Well the following lines are trying to open workbooks named in M1 and M2 from "C:\Documents and Settings\leaxl49\Desktop", so if that is not the correct path, and you don't have anything in M1 or M2 then I'm not surprised that it is not doing anything

    Please Login or Register  to view this content.
    I thought that the macro was something you had written, but obviously not, in which case it sounds like it is totally unsuitable for what you want, (other than helping you learn how to do it correctly yourself).
    So lets start at the beginning, ignoring the irrelevant code you have posted, what are you ACTUALLY trying to achieve?

  5. #5
    Registered User
    Join Date
    05-15-2009
    Location
    Springfield Missouri
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Pulling data from several workbooks to single Master workbook

    I am trying to create a Master workbook with a sheet for each department. Each department has certain information that they want that is scattered throughout our server. I want the information from all over the server brought into the Master workbook.

  6. #6
    Forum Contributor
    Join Date
    02-23-2006
    Location
    Near London, England
    MS-Off Ver
    Office 2003
    Posts
    770

    Re: Pulling data from several workbooks to single Master workbook

    Your question is too vague for anyone to be able to really help you I think...
    Where is the data? Where is it stored? (Location, not just 'on the server')
    How is the data formatted?
    How do you want it brought into the master workbook? Do you want say the first spreadsheet of each of the other workbooks brought into the master? Should each import be a seperate sheet, or should they all be combined in some way?

  7. #7
    Registered User
    Join Date
    05-15-2009
    Location
    Springfield Missouri
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Pulling data from several workbooks to single Master workbook

    All of the files are on a drive O:\shared\ _____\ ____ and then in a folder or two in there. I am wanting one single cell (B5) from Workbook A, Sheet 2 to be imported into Cell C7 in Workbook B, Sheet 4.

  8. #8
    Registered User
    Join Date
    05-15-2009
    Location
    Springfield Missouri
    MS-Off Ver
    Excel 2003
    Posts
    46

    Re: Pulling data from several workbooks to single Master workbook

    Also I was able to get excel to import the formula from from the spreadsheet but not the number that the formula made.

+ 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