+ Reply to Thread
Results 1 to 3 of 3

Linking up to worksheets through Many-to-Many relationship

  1. #1
    Registered User
    Join Date
    06-06-2014
    Posts
    5

    Linking up to worksheets through Many-to-Many relationship

    Hi everyone, I'd like to seek help from you guys in writing a VBA code to link up two Excel worksheets, which consist of relative large volume of data. Let's say the two data lists are in the forms of the following:

    Sheet 1:
    Customer Key, Account Number, Balance
    ID001, AC001, $100
    ID001, AC002, $30
    ID002, AC006, $20
    ID002, AC007, $0
    ID003, AC010, $500

    Sheet 2:
    Customer Key, Bonus ID, Bonus Point
    ID001, BB001, 240
    ID001, BB002, 100
    ID002, BB005, 320

    The required output will be placed in the Sheet 3 and it will be look like this:

    Sheet 3:
    Customer Key, Account Number, Balance, Bonus ID, Bonus Point
    ID001, AC001, $100, BB001, 240
    ID001, AC001, $100, BB002, 100
    ID001, AC002, $30, BB001, 240
    ID001, AC002, $30, BB002, 100
    ID002, AC006, $20, BB005, 320
    ID002, AC007, $0, BB005, 320
    ID003, AC010, $500
    ...

    Can the final output be generated via writting an effective Excel VBA code?

    Many thanks for your help in advance!

  2. #2
    Registered User
    Join Date
    03-26-2019
    Location
    Australia
    MS-Off Ver
    O365
    Posts
    4

    Re: Linking up to worksheets through Many-to-Many relationship

    I too am interested in the answer to this question. I'm new here and I don't know how to follow.

  3. #3
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2405 Win 11 Home 64 Bit
    Posts
    23,897

    Re: Linking up to worksheets through Many-to-Many relationship

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

+ 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. linking tables with a relationship instead of vlookup
    By Atomic BI in forum Excel General
    Replies: 0
    Last Post: 03-29-2016, 12:48 PM
  2. Linking two cells in a constant relationship
    By paroduso33 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 09-18-2013, 05:28 PM
  3. Replies: 0
    Last Post: 04-04-2012, 08:12 AM
  4. Excel Relationship linking Macro
    By learning in forum Excel Programming / VBA / Macros
    Replies: 88
    Last Post: 07-08-2010, 04:23 AM
  5. Linking Worksheets
    By wolffboy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-18-2009, 08:10 AM
  6. Replies: 3
    Last Post: 02-11-2007, 10:17 AM
  7. Linking worksheets
    By ghost635 in forum Excel - New Users/Basics
    Replies: 1
    Last Post: 05-19-2005, 04:06 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