+ Reply to Thread
Results 1 to 9 of 9

Look up to find data on duplicate values

  1. #1
    Registered User
    Join Date
    10-14-2019
    Location
    india
    MS-Off Ver
    office 365
    Posts
    7

    Question Look up to find data on duplicate values

    Hello Everyone,

    I have a query on the sheet attached below.

    The reason i m posting it here is that i am not sure whether there's some formula that can solve this or VBA is required to answer this.

    My Query is, that on Sheet 1 in Column A i have some sales offices for which the employees are listed on the Sheet 2 in Column B.
    Now, I m required to use any method to bring those few names to Sheet 1 in Column B with their respective sales offices.

    But the challenge is that the records on Sheet 1, even after using several formula combinations, keep on repeating.

    For example: on Sheet 1 Chicago has 16 records whereas, on the Sheet 2 employees available against Chicago are only 4. So, i would like to know if there's some method that can make all those 4 employees appear on Sheet 1 against their sales office i.e. Chicago and reset the count when it hits 4 and initiate the same process again for the next 4 records on Sheet 1 and so on.

    I have added the result on the same sheet.

    Thank You in advance

    Regards
    Uday
    Attached Files Attached Files

  2. #2
    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,860

    Re: Look up to find data on duplicate values

    I have performed a table merge using Power Query. Attached is the file. Is this what you are looking for. Steps taken:
    1. Load each table to PQ
    2. Close and Load to Connection only
    3. Merge into new query joining on Location. Left Outer Join.

    Here is the Mcode for the merge

    Please Login or Register  to view this content.
    File is attached for your analysis.

    If you are unfamiliar with Power Query, click on the two links in my signature.
    Attached Files Attached Files
    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

  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,860

    Re: Look up to find data on duplicate values

    crossposted: https://chandoo.org/forum/threads/mu...-values.42853/

    Rule 03: Cross-posting Without Telling Us

    Your post does not comply with Rule 3 of our Forum RULES. Do not cross-post your question on multiple forums without telling us about your threads on other forums.

    Post a link to any other forums where you have asked the same question.

    Cross-posting is when you post the same question in other forums on the web. The last thing you want to do is waste people's time working on an issue you have already resolved elsewhere. We prefer that you not cross-post at all, but if you do (and it's unlikely to go unnoticed), you MUST provide a link (copy the url from the address bar in your browser) to the cross-post.

    Read this to understand why we ask you to do this.

    I have added the crosspost reference for you today. Please comply with this and all our rules in the future

    If you have other sites--please post them now!!

  4. #4
    Registered User
    Join Date
    10-14-2019
    Location
    india
    MS-Off Ver
    office 365
    Posts
    7

    Re: Look up to find data on duplicate values

    Thank You So much. I really appreciate your time and effort. and while this does the job pretty well, this is not what i was looking for.
    I am in need of some VBA code or formula in excel that can be copied and applied to multiple workbooks along with other codes and formulas.

    as far as cross posting is concerned. Thank you for letting me know about it. I'll ensure i am following the rules in future.

  5. #5
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Look up to find data on duplicate values

    Try pasting the following formula into cell B2 on Sheet 1:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    If this yields acceptable results please mark this thread and the one on chandoo.org as 'Solved'.
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  6. #6
    Registered User
    Join Date
    10-14-2019
    Location
    india
    MS-Off Ver
    office 365
    Posts
    7

    Re: Look up to find data on duplicate values

    Thank you so much for taking out time to help me out with this.
    This code looks a perfect solution to this query but i am unable to apply it mainly because the naming ranges and especially '#Headers' you've used in the formula, i do not have on my workbook.
    Do you think you can help me with that too.

  7. #7
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Look up to find data on duplicate values

    My apologies. I had converted the range (A1:B35) on sheet 2 into a table (Table2), there are no named ranges.
    To convert the range into a table select any cell in the range and press Ctrl + t
    When the Create Table dialog box pops up select OK.
    Look at the Table Tools tab to make sure that the name is Table2.
    Let us know if you have any questions.

  8. #8
    Registered User
    Join Date
    10-14-2019
    Location
    india
    MS-Off Ver
    office 365
    Posts
    7

    Red face Re: Look up to find data on duplicate values

    Thank You so much for your help. Its working absolutely fine. You really is a Guru. Please tell me how can i mark this one as Solved.

  9. #9
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,532

    Re: Look up to find data on duplicate values

    You're Welcome and thank you for the feedback. To mark a thread as 'Solved' use the thread tools menu above your first post. I hope that you have a blessed day.

+ 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: 3
    Last Post: 04-22-2019, 05:04 PM
  2. Replies: 1
    Last Post: 10-12-2018, 12:19 PM
  3. I need to club two column values and search with it to find duplicate values
    By Abhimanyu.bade in forum Hello..Introduce yourself
    Replies: 2
    Last Post: 09-21-2018, 10:31 AM
  4. [SOLVED] Find count of Unique or Duplicate Values based on Concatenated values in 2 columns
    By bdicarlo1 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 12-03-2014, 12:42 AM
  5. Trying to find duplicate values
    By cmax979 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-04-2013, 05:38 PM
  6. Find duplicate values
    By Hurricanefly in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 05-23-2013, 09:18 AM
  7. [SOLVED] How to find duplicate values from two sets of data in excel 2010
    By ratu4110 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 07-30-2012, 04:07 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