+ Reply to Thread
Results 1 to 12 of 12

How to generate automatic Family Unique Group ID

  1. #1
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    How to generate automatic Family Unique Group ID

    Dear Forum

    I want to create an automatic ID match with two names. Model sheet has been attached for your kind reference.

    Describing requirement:

    I have a master data set, which catches regular visitors of health center. Column C and M has a couples name. For example: If Column C has husband name, then Column M would have wife name. It happens wise versa also.

    Now I need a automatic family unique ID should be created for each family based on name matches with C and M. I have tried the following code. But no positive results.

    Please Login or Register  to view this content.
    Kindly do the needful.

    Thanks in advance.
    Attached Files Attached Files
    Last edited by alansidman; 09-29-2016 at 01:07 PM. Reason: code tags added in accordance with forum rules

  2. #2
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: How to generate automatic Family Unique Group ID

    I see you are using Parent for unmarried individuals. What happens to the unique ID once they marry? Personally, I'd just use their address, as they are likely to be living together.
    Frob first, tweak later

  3. #3
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to generate automatic Family Unique Group ID

    Dear Mr. Neil,

    Thanks for your reply. Here i can use only bread winner name for the family. Bread winner name will be the match name for wife and children. If that adult get married, automatically, they will become a separate family. Hence Kindly do the needful.

    Thanks in advance

  4. #4
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: How to generate automatic Family Unique Group ID

    Hope this is what you wanted. I've done it with an array formula rather than code.
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to generate automatic Family Unique Group ID

    Dear Mr. Neil,

    Really thanks for your support. But i really want to match with names. See, This master data set is dynamic one. As you guided, if i apply for rest of the cells and do any new entry it returns each ID for family members also. Kindly help me on this. It would be really appreciated, if VBA code.

    Thanks

  6. #6
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: How to generate automatic Family Unique Group ID

    I see. Let me re-think

  7. #7
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to generate automatic Family Unique Group ID

    Rather than create a new ID for each pair of couple names. Would it work if you just contented the two names and used MaryJonesSamJones as the family ID.

    You could alphabetize before concantnating


    =IF(C1<M1, C1&M1, M1&C1)
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  8. #8
    Valued Forum Contributor Neil_'s Avatar
    Join Date
    04-19-2013
    Location
    Yorkshire
    MS-Off Ver
    Office 365 Enterprise E3 2013 / 2016
    Posts
    479

    Re: How to generate automatic Family Unique Group ID

    Hope this is ok for you.
    Attached Files Attached Files

  9. #9
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to generate automatic Family Unique Group ID

    Dear Mr. Neil,

    Thanks for your efforts and guidance, I will do the test and come back.

    Bala

  10. #10
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to generate automatic Family Unique Group ID

    Dear Mr. Nail,

    Thanks for the support to write a code. But my requirement is very simple. I want to generate ID based on match those two names (Column C (James) and Column V (Reeta)) and vise versa, when Reeta comes in Column C and James Comes in Column V. I dont want to complicate finding Male and all. Sometimes Reeta may get first entry in the list.

    Please guide me

  11. #11
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: How to generate automatic Family Unique Group ID

    How about the formula =IF(V1<C1, V1&C1, C1&V1) creating the ID "JamesRita".

    If James is in either C1 or V1 and Rita is in the other, the ID will be the same.

  12. #12
    Forum Contributor
    Join Date
    08-19-2016
    Location
    Chennai, India
    MS-Off Ver
    2007
    Posts
    300

    Re: How to generate automatic Family Unique Group ID

    Dear Mr. mikerickson,

    Thanks for your help and support. That was really nice formula and has few disadvantage too. While i am applying this formula, if spouse name is not available, automatically it returns the main person's name. I need to have a Family ID just to find out How many members has been visited as family to my health center as well as services taken by them as family. Hence Could you please help me on this to get Family ID (OD/GJM/FID/0001) in this pattern. Either by formula or VBA code. If VBA code, really i will happy for this.

    Thanks in advance.

+ 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] How to generate automatic Family Unique Group ID - Tried with few formula
    By bala04msw in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-30-2016, 06:48 AM
  2. [SOLVED] Merge name against unique group and get max value for group
    By pnnaik in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 09-20-2015, 10:02 AM
  3. Replies: 7
    Last Post: 11-05-2014, 04:23 AM
  4. [SOLVED] automatic generate invoice number + 1
    By aimjhun in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-20-2014, 03:15 AM
  5. Automatic email generate
    By shady_ryo in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-07-2014, 11:49 PM
  6. Automatic generate list: row, column and values
    By Gugu89 in forum Excel General
    Replies: 2
    Last Post: 07-08-2013, 06:47 PM
  7. Hello, i am new joiner in Excel group family here
    By Rein1010 in forum Hello..Introduce yourself
    Replies: 1
    Last Post: 06-30-2013, 01:11 AM

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