+ Reply to Thread
Results 1 to 8 of 8

building relationships between two worksheets

  1. #1
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    building relationships between two worksheets

    I recently watched a video that showed how to combine two worksheets together with a relationship, so that you could create a pivot table using the data from both sheets. The error I am getting is the " both columns contains duplicate values" message but it does not make since. On the video I watched they combined the two worksheets using a column on each sheet that had the same header and the same data. I checked and the two columns are almost identical with multiple shared values and duplicate data. When I try to combine them it works fine, but on my workbook I get the error message. Is there something simple I am not seeing? A formatting issue or something?
    Attached Files Attached Files

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,637

    Re: building relationships between two worksheets

    Which columns? There are no explanatory notes in the workbook and there's nothing in the Relationships dialog.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: building relationships between two worksheets

    A little more detail. How are you combining these two ranges. I am not sure what the common field is. It would be better if you only used 10-15 records and showed what a mocked up solution looked like.
    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

  4. #4
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    Re: building relationships between two worksheets

    Quote Originally Posted by AliGW View Post
    Which columns? There are no explanatory notes in the workbook and there's nothing in the Relationships dialog.
    The two columns I want to use are either shift or date since they are shared between the two worksheets.

  5. #5
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,637

    Re: building relationships between two worksheets

    How do you want to use them? More detail, please. You should know by now that a good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

  6. #6
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,637

    Re: building relationships between two worksheets

    I think, based on my knowledge of relational databases, you need columns with a one-to-many relationship, that is where there are NO DUPLICATES in that column in one of the two tables. I think you are trying to relate tables with a many-to-many relationship, and this is what the error message is telling you.

  7. #7
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    Re: building relationships between two worksheets

    So the two (or more) worksheets should only have one column that is the same between the two of them with the rest being unique? Since my example has both date and shift columns on both sheets, it wont work, but if there was only one date and two shifts columns it would be ok?

    That could be an issue. This was just the example. The main workbook has 8 worksheets each with corresponding columns and data. I don't think my end goal is going to work.

    Below is a relationship chart I created showing all the worksheets and the corresponding columns on each one.

    My goal was to be able to create a pivot table from all the data without having to create a combined worksheet with tons of index matches, v-lookups and get a slow
    calculating monster. But I think the relationships between the sheets will be to complex, and it will be almost impossible to line up the data correctly.
    Attached Files Attached Files
    Last edited by AliGW; 06-09-2022 at 07:30 AM. Reason: PLEASE don't quote unnecessarily!

  8. #8
    Forum Contributor
    Join Date
    04-04-2016
    Location
    dallas tx
    MS-Off Ver
    365 (15.0.5501.1000)
    Posts
    534

    Re: building relationships between two worksheets

    The end goal is to have a dashboard that can take all the data and display it without a ton of calculation pages. The data is vast though with multiple metrics being recorded. It's warehouse shift data.

    So you have
    on this date, Tom worked from x to z, in that time he did jobs 1,2,3 and 4, during those jobs he faced the following issues, 7,6,5,and 4, so today his performance was "blank".
    times that by 30 people per shift, two shifts a day, one on the weekend, and then be able to look at the report either from a whole, shift, department, or individual bases, as well as daily, weekly, or monthly.
    right now I individualy create the reports I need with formulas and vba but the calculation times and having to reference all the worksheets and workbooks that hold the individual data can eat a lot of time and is not efficient. I thought buy "combining" all the worksheets and creating a single pivot table from the combined data I can filter as needed, and it wouldn't take so long or take up so much room.

+ 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. [SOLVED] Tool to map relationships between worksheets in the same workbook
    By billfinnjr in forum Excel General
    Replies: 4
    Last Post: 09-17-2018, 09:13 AM
  2. Replies: 3
    Last Post: 02-21-2017, 02:48 AM
  3. Iterate through Worksheets Building an Array
    By MaterialMaster in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 09-12-2014, 04:34 PM
  4. building a revenue forecasting model and need calendar building help
    By miken33 in forum Excel - New Users/Basics
    Replies: 0
    Last Post: 03-11-2013, 06:53 PM
  5. [SOLVED] Help building a macro to break down 2 worksheets and combine into one?
    By LDouble3 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 12-17-2012, 02:05 PM
  6. Replies: 2
    Last Post: 10-08-2012, 12:49 PM
  7. [SOLVED] Building an array of worksheets for printing
    By DRK in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2005, 09:05 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