Results 1 to 9 of 9

Thread: Macro to match identical names and allocate ID's

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0

    Macro to match identical names and allocate ID's

    HI everyone,
    The records in column D (name) have identical names which can be 4-5,

    The Column B (reference) have different numbers in it.

    The column A contains ID's. (Which is different)

    Now i want to allocate the same ID's (Col A) to all the identical names in Column D.

    Before giving ID to identical group I have to make selection from Column B (Reference)

    For example identical 5 name in column D, then Column B has 5 different nos. like 1001,1002,2001,2002,2003 then 2001 ID (Column A)
    is most important and this ID will be given next 4 ID's Col A.

    I have a big data base to convert like this so whats the best option, a proper direction, Confused?

    Please help?

    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    https://eileenslounge.com/viewtopic.php?p=244184#p244184
    https://eileenslounge.com/viewtopic.php?p=246586#p246586
    https://eileenslounge.com/viewtopic.php?p=246112#p246112
    https://eileenslounge.com/viewtopic.php?p=246112#p246112
    https://eileenslounge.com/viewtopic.php?p=245761#p245761
    https://eileenslounge.com/viewtopic.php?p=245722#p245722
    https://eileenslounge.com/viewtopic.php?p=245616#p245616
    https://eileenslounge.com/viewtopic.php?p=247043#p247043
    https://www.excelfox.com/forum/showthread.php/2307-VBA-Range-Sort-with-arrays-Alternative-for-simple-use
    https://eileenslounge.com/viewtopic.php?p=245238#p245238
    https://eileenslounge.com/viewtopic.php?p=245131#p245131
    https://eileenslounge.com/viewtopic.php?f=18&t=31638
    https://eileenslounge.com/viewtopic.php?p=244579#p244579
    https://eileenslounge.com/viewtopic.php?p=244648#p244648
    https://eileenslounge.com/viewtopic.php?p=244647#p244647
    https://eileenslounge.com/viewtopic.php?p=244577#p244577
    https://eileenslounge.com/viewtopic.php?p=245201#p245201
    https://eileenslounge.com/viewtopic.php?p=243975#p243975
    https://eileenslounge.com/viewtopic.php?p=243884#p243884
    https://eileenslounge.com/viewtopic.php?p=242439#p242439
    https://eileenslounge.com/viewtopic.php?p=243595#p243595
    https://eileenslounge.com/viewtopic.php?p=243589#p243589
    https://eileenslounge.com/viewtopic.php?p=243589#p243589
    https://eileenslounge.com/viewtopic.php?p=243002#p243002
    https://www.eileenslounge.com/viewtopic.php?p=242761#p242761
    https://eileenslounge.com/viewtopic.php?p=242459#p242459
    https://eileenslounge.com/viewtopic.php?p=242054#p242054
    https://eileenslounge.com/viewtopic.php?p=241404#p241404
    https://eileenslounge.com/viewtopic.php?p=229145#p229145
    https://eileenslounge.com/viewtopic.php?p=228710#p228710
    https://eileenslounge.com/viewtopic.php?p=226938#p226938
    https://eileenslounge.com/viewtopic.php?f=18&t=28885
    https://eileenslounge.com/viewtopic.php?p=222689#p222689
    https://eileenslounge.com/viewtopic.php?p=221622#p221622
    https://eileenslounge.com/viewtopic.php?f=27&t=22512
    https://eileenslounge.com/viewtopic.php?f=26&t=26183
    https://eileenslounge.com/viewtopic.php?f=26&t=26030
    https://eileenslounge.com/viewtopic.php?p=202322#p202322
    https://www.excelforum.com/word-formatting-and-general/1174522-finding-a-particular-word-phrase-in-word.html#post4604396
    https://www.youtube.com/channel/UCnxwq2aGJRbjOo_MO54oaHA
    Attached Files Attached Files
    Last edited by DocAElstein; 04-16-2024 at 06:42 PM.

  2. #2
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    So for deciding which ID to use for all identical names, you will decide which reference to use as priority? Also, why has the 3 records for MR. THOMAS CANES reduced to 2 records after making the ID same? Why the last record is removed?
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  3. #3
    Junior Member
    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0
    Quote Originally Posted by Excel Fox View Post
    So for deciding which ID to use for all identical names, you will decide which reference to use as priority? Also, why has the 3 records for MR. THOMAS CANES reduced to 2 records after making the ID same? Why the last record is removed?
    Thanks for reply.

    The reference will be set by us and they are this
    There are 8 different references.

    1. 1001
    1002 Between this 2 the ID of 1001 will be alloted to 1002

    2 1001
    1002
    3001 Between this 4 the ID of 1001 will be alloted all
    3003

    3 1001
    1002
    3001
    3003 Between this 8 the ID of 2001 will be alloted to all.
    2001
    2002
    2003
    2010

    Also, why has the 3 records for MR. THOMAS CANES reduced to 2 records after making the ID same?

    Because the 3 record was correct, and all 2 records (ID's) were linked and corrected.

    Hoping for favourable reply.

  4. #4
    Administrator Excel Fox's Avatar
    Join Date
    Mar 2011
    Posts
    1,402
    Rep Power
    10
    Sorry, but I can't understand any of that. I could think that I understand the point for the first two sets, where you want 1001 to be allotted for all. But I don't understand what's the logic of allotting 2001 for all those in the 3rd set.

    And I don't understand the next point of removing that one row.
    A dream is not something you see when you are asleep, but something you strive for when you are awake.

    It's usually a bad idea to say that something can't be done.

    The difference between dream and aim, is that one requires soundless sleep to see and the other requires sleepless efforts to achieve

    Join us at Facebook

  5. #5
    Junior Member
    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0
    For better understanding i have revised the sample file.
    Attached Files Attached Files

  6. #6
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    Quote Originally Posted by foncesa View Post
    For better understanding i have revised the sample file.
    That does not tell us anything more than what you told us in Message #3. Don't simply tell us that you used 2001 instead of 1001, tell us WHY you used 2001 instead of 1001... what is the logic behind making that choice? Remember, we know nothing about your "business model" except for what you tell us, and so far, you haven't told us anything about how your business model works. Now, I can take a guess that maybe the reason you used 2001 instead of 1001 is because it is out of numerical sequence (2001 is less than the number above it, not greater than the number above it)... is that the reason? If so, then you need to tell us what you would use for this sequence...

    1001
    1002
    4001
    3001
    5001
    2001

    3001 or 2001 (the first or last out of sequence number)?

  7. #7
    Junior Member
    Join Date
    Jun 2013
    Posts
    4
    Rep Power
    0
    1001
    1002
    4001
    3001
    5001
    2001

    3001 or 2001 (the first or last out of sequence number)?
    If this is there then our set criteria will be 2001 always.
    1001
    1002
    4001
    3001
    5001

    If this is there then our set criteria will be 1001 always.
    Hope I was able to explain.
    Attached Files Attached Files
    Last edited by foncesa; 06-23-2013 at 11:44 AM.

  8. #8
    Forum Guru Rick Rothstein's Avatar
    Join Date
    Feb 2012
    Posts
    662
    Rep Power
    14
    No, you have not "explained", you have simply "said". Look, if these were the numbers...

    1001
    1002
    4001
    3001
    5001
    2001

    You said the answer would be 2001. WHY??? And if these were the numbers...

    1001
    1002
    4001
    3001
    5001

    You said the answer would be 1001. WHY???

    You have to tell us the logic behind why those are the answers... do not just say they are the answer... tell us why you decided they are the answer. I know you are not just randomly selecting a value from the list of number, but what is not clear to us is why you chose those particular numbers. If you cannot tell us that, then I do not see how anyone will be able to help you (I know I will not be able to without a clear explanation why you select the numbers that you do).
    Last edited by Rick Rothstein; 06-23-2013 at 12:09 PM.

Similar Threads

  1. Staffing Scheduling HELP Match/Index
    By mgelston in forum Excel Help
    Replies: 2
    Last Post: 06-20-2013, 01:09 AM
  2. Replies: 3
    Last Post: 03-27-2013, 10:41 AM
  3. Display sheet names in a message box
    By pells in forum Excel Help
    Replies: 4
    Last Post: 02-13-2013, 07:33 PM
  4. List all Worksheet Names Using Formula
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 6
    Last Post: 12-17-2012, 02:47 AM
  5. Delete Names In A Specific Worksheet
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 08-14-2011, 02:38 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •