+ Reply to Thread
Results 1 to 5 of 5

Build Database - 1 master files with several files (VLOOKUP)

  1. #1
    Registered User
    Join Date
    01-15-2016
    Location
    Luanda
    MS-Off Ver
    Windows 2013
    Posts
    6

    Build Database - 1 master files with several files (VLOOKUP)

    Hi there,

    I confess I have just registered for help! Nonetheless, I have used this forum several times looking for vba code and excel tips.

    My conundrum is as follows:

    I would like to build a MasterFile, where I can aggregate the Production of each country (~230) per product (~120).

    So, the objective is to fill the Master file (Countries in rows, Products in collumns) with information from each file (~120 = a file for each product) in the same folder, as show in the attached MasterDB file.

    The other small caveat is that the number of the collumn where the data should be matched with the country and pasted, is in cell A2 of each file.

    Example: "Product : 4407 Wood"

    But for this I already have the solution in a formula (that I suppose can become a variable?)

    =VALUE(MID(MID(MID(SUBSTITUTE(A2;" ";"^";2);1;256);FIND("^";SUBSTITUTE(A2;" ";"^";2));256);2;FIND(" ";MID(MID(SUBSTITUTE(A2;" ";"^";2);1;256);FIND("^";SUBSTITUTE(A2;" ";"^";2));256))-2))

    I'm sending 3 files so that it's better to understand:

    MasterDB - Where info should be compiled
    4401 & 4407 - Files with info

    Well, hope anyone can take on this challenge!

    Many thanks,
    Attached Files Attached Files

  2. #2
    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: Build Database - 1 master files with several files (VLOOKUP)

    Hi GustavoPT

    Welcome to the Forum!!!

    Are the File Names the same as the Product Names (4401, 4407, etc.)? If so, why do we need this...

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Are the Product Files in the same Folder as the MasterDB File?
    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.

  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: Build Database - 1 master files with several files (VLOOKUP)

    Hi GustavoPT

    This Code in the attached makes certain assumptions and appears to do as you require...let me know of issues.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-15-2016
    Location
    Luanda
    MS-Off Ver
    Windows 2013
    Posts
    6

    Re: Build Database - 1 master files with several files (VLOOKUP)

    Hi jaslake,

    Thanks for your reply!

    Meanwhile on Friday and Saturday I ended up achieving what I need, though I know the code is a bit rough.

    Regarding your question, I need to extract from the cell the product code (therefore the collumn in the MasterDB where the data should be inserted). Example: "Product : 960330 Artists', writing and similar brushes for the application of cosmetics"

    Anyway, The code I ended up with is:

    Please Login or Register  to view this content.
    As you can see, the code is a bit rough, especially the "vlookup" function. I will try and use your PROPER code for this!
    Last edited by GustavoPT; 01-18-2016 at 04:55 AM.

  5. #5
    Registered User
    Join Date
    01-15-2016
    Location
    Luanda
    MS-Off Ver
    Windows 2013
    Posts
    6

    Re: Build Database - 1 master files with several files (VLOOKUP)

    (EDIT: Double Post)
    Last edited by GustavoPT; 01-18-2016 at 04:32 AM. Reason: Double Post

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 4
    Last Post: 12-04-2014, 12:14 PM
  2. Vlookup query : How to pull data from raw excel files into a master excel file?
    By jamesjamesiata in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-22-2013, 06:26 AM
  3. Replies: 0
    Last Post: 11-27-2012, 01:43 PM
  4. Master inventory spreadsheet that pulls information from individual files via vlookup
    By whittakema in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-31-2012, 09:48 AM
  5. update master files from multiple children files
    By natalie.phuong in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 08-12-2009, 03:34 AM
  6. Transfering files from lots of files to one single Exel master file.
    By yjacob in forum Excel Programming / VBA / Macros
    Replies: 16
    Last Post: 07-01-2009, 11:37 AM
  7. I want to attach word files or PDF files to an excel database
    By Dianne Munro in forum Excel General
    Replies: 1
    Last Post: 03-22-2006, 08:15 PM

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