+ Reply to Thread
Results 1 to 3 of 3

Joining Data between two excel files

  1. #1
    Registered User
    Join Date
    10-27-2006
    Posts
    18

    Joining Data between two excel files

    Hi,
    I have a problem with joining data between 2 worksheets. I think vlookup can solve the problem, but have no idea how!

    I have two separate excel files, I and II. Each file has around 30 columns. There are two columns from excel file I that I need to add to excel file II based on the values found in 4 columns, since the presence of these 4 values together is unique to this row.

    Example:

    Excel file I
    A B C C D E F
    5 6 7 8 0.1 0.2
    1 2 3 4 0.3 0.4
    2 3 4 5 0.2 0.3


    Excel file II
    A B C D
    2 3 4 5
    1 2 3 4
    5 6 7 8


    Any idea how this can be done. Also is there a way to use a macro instead of doing it to every file. I have around 1000 of these files!!!

    Thanks!

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Try an array like

    VBA Noob
    Attached Files Attached Files
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    10-27-2006
    Posts
    18

    Thumbs up Thanks! Another question please.

    Thanks VBA Noob,
    It finally worked! I just needed to change the reference in your equation to match my condition more.

    Another question. Is it possible to use a macro for this equation, such that depending on the sheets name, I would go to a certain file.

    Example, if I am in sheet: Test1, I would like to search in the file named Test(1).

    I hope it can work out since I have 30 worksheets and 30 files!

+ 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