+ Reply to Thread
Results 1 to 8 of 8

Get children of members

  1. #1
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Get children of members

    I have a list of people, some are members, some are not, and some are children of members (also not members).

    I need to get all children of each member and concatenate them into a cell (Children in column E). Obviously, husbands and wives will often have the same children.

    My fields:

    First Name.......Child.......Membership.......Household ID.......Children
    Bob...................FALSE.....Member.........1234567............Larry, Cindy
    Larry.................TRUE...........................1234567
    Amanda.............FALSE.....Member........1234567.............Larry, Cindy
    Karl...................FALSE.........................7654321
    Cindy.................TRUE..........................1234567


    I have attached a parsed down file with an "Actual" and "Desired" look. Mind you, we have many more people than I show.

    Note:
    All members will have Household ID. Some of the older entries did not.
    The membership column may say "Visitor" or "Non Member" or just be blank.
    There can be up to two adults in any household.
    I don't need children of non members, but if it is easier to figure, that is fine.
    Not all columns are shown.

    I thought about using an array with the Household ID as a dimension, but there are nearly a million integers (not a million actual households). Honestly, if I just had some direction on how to approach this it would be very helpful.
    Attached Files Attached Files
    Last edited by bentod; 01-17-2020 at 11:51 PM.

  2. #2
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Get children of members

    I could put the unique Household IDs in a new column.
    Make a string variable for the name.

    Then I could go through each Household ID in a case
    is it a Member - no, is it a Child - yes, is the Name string empty - yes: add the name to the string, next row
    is it a Member - no, is it a Child - yes, is the Name string empty - no: put the Name in the string, next row
    is it a Member - no, is it a Child - no, next row
    is it a Member - yes, next row

    at the last row, put the string in the cell next to the Household ID and start at the next Household ID

  3. #3
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Get children of members

    Here's my start (delete the second table and top two rows)

    Please Login or Register  to view this content.

  4. #4
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Get children of members

    This works except everyone in the household gets the children. I can live with that since I'm going to erase all the rows where the Child value is true.

    Please Login or Register  to view this content.

  5. #5
    Valued Forum Contributor
    Join Date
    02-02-2016
    Location
    Indonesia
    MS-Off Ver
    Office 365
    Posts
    1,004

    Re: Get children of members

    Try this:
    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,524

    Re: Get children of members

    UDF
    Use in cell like
    E4:
    =IF(C4="member",Children(D4,$A$4:$D$29),"")
    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-21-2014
    Location
    Oregon, USA
    MS-Off Ver
    Excel 2007
    Posts
    74

    Re: Get children of members

    That did it!

    Thank you

  8. #8
    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,830

    Re: Get children of members

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.
    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.

+ 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: 5
    Last Post: 08-28-2019, 10:05 PM
  2. protect template but not the children
    By finlander in forum Excel General
    Replies: 1
    Last Post: 07-25-2014, 06:18 AM
  3. Need children ID's on own line in report
    By hmr2662 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-13-2013, 11:14 AM
  4. Replies: 7
    Last Post: 03-29-2013, 04:42 PM
  5. Count Children of all nodes in a treeview
    By Macdave_19 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-18-2010, 10:05 AM
  6. Master spreadsheet to display value from children
    By gyro11 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-16-2008, 07:52 AM
  7. [SOLVED] XML / parent with multiple children and with multiple children
    By Richard in forum Excel General
    Replies: 0
    Last Post: 01-05-2005, 08:06 AM

Tags for this Thread

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