+ Reply to Thread
Results 1 to 7 of 7

Import data into excel from another workbook

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Question Import data into excel from another workbook


    Hi Guys, I am in need of some assistance here. I've been searching for code, but haven't found exactly what I needed. Basically I have a large amount of excel documents that hold individual PC information in each one and each file is named after the PC. I need to be able to pull in each sheet and have the data copied into the excel sheet for inventory purposes. I would prefer if I could pull in each PC files information while having the PC data file closed and just using the file name to target the file. The inventory excel sheet will need to pull in the information into certain cells then go to the next tab so I can pull in the next document or something close to that.

    I've attached examples.
    The PC file was actually a .csv but it wouldn't upload so I saved it as an excel file.

    Inventory Workbook.xlsx is the Inventory workbook all the files will need to be pulled into.

    PC1234.xlsv is an example of a PC which needs to be pulled in.

    There will be multiple PC "sheets" IE: PC1235, PC1233 etc..

    Thanks for your assistance.
    Ancient


    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    09-07-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Importing data into excel from another workbook

    Nothing?.,.

  3. #3
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Importing data into excel from another workbook

    Hi ancientone

    I'm unable to see any relationship between the two files you posted. Column headings show no relationship; data in "Inventory Workbook.xlsx " shows no relationship to data in "PC1234.xlsv ".

    Demonstrate a before and after...perhaps I can help.

    John
    John

    If you have issues with Code I've provided, I appreciate your feedback.

    In the event Code provided resolves your issue, please mark your Thread as SOLVED.

    If you're satisfied by any members response to your issue please use the star icon at the lower left of their post.

  4. #4
    Registered User
    Join Date
    09-07-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Import data into excel from another workbook

    I guess I didn't show that well. Basically from the PC file I need that data imported from specific cells to specific cells in the inventory workbook. I have multiple PC files so I need a way to change the target file and pull the same information again just in a new tab. Does that make sense?

  5. #5
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Import data into excel from another workbook

    Hi ancientone
    There's many examples on the web to do what you describe; this is just an example.
    Please Login or Register  to view this content.
    This particular code assumes all workbooks are in the same folder. It does open the source files but immediately closes the file after the extraction. Let me know if I can help in adapting it to your needs.

    John

  6. #6
    Registered User
    Join Date
    09-07-2010
    Location
    New York
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: Import data into excel from another workbook

    Each "PC" file will have the data in the same cells that I need transferred to the "Main Workbook" however I need to transfer to specific cells in the workbook in one row then go down a row to insert the next PC information. Is that possible? I can code but I just need a basic template to follow.

  7. #7
    Forum Expert jaslake's Avatar
    Join Date
    02-21-2009
    Location
    Atwood Lake in Mid NE Ohio...look it up.
    MS-Off Ver
    Excel 2010 2019
    Posts
    12,749

    Re: Import data into excel from another workbook

    Hi ancientone

    If I understand your request, yes, I should think this is possible
    I need to transfer to specific cells in the workbook in one row then go down a row to insert the next PC information. Is that possible?
    The code previously posted should be able to accomplish such; you'll need to modify this section
    Please Login or Register  to view this content.
    to define what you want to copy and to where you wish to paste. If you'd like some help with that, please post an example "Master Workbook" and a "PC" workbook. Dummy up the "Mater Workbook" so it contains data from the "PC" workbook that you wish extracted.
    Demonstrate a before and after...perhaps I can help.
    John

+ 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