+ Reply to Thread
Results 1 to 7 of 7

Grouping rows based on partial match

  1. #1
    Registered User
    Join Date
    10-01-2012
    Location
    moon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Lightbulb Grouping rows based on partial match

    Hello experts,

    Your help is greatly appreciated in figuring out a solution for grouping rows in a table so address labels can be printed.

    The challenge is, several individuals reside at the same address and are a family so they have to be grouped and one label be printed for that family.

    I have flagged members of a family with an "F" or "F1" in a column.

    Columns are "last name", "first name", "Address", "Flag".

    Data Sample:

    Doe John 123 Main Street F
    Doe Jane 123 Main Street F
    Doe Sam 123 Main Street F
    Smith Bob 123 Main Street F1
    Smith Mary 456 Next Ave
    Brown Joy 123 Main Street F1

    Labels should look like:

    Doe
    John, Jane, Sam
    123 Main Street

    Smith, Bob
    Brown, Joy
    123 Main Street

    Smith, Mary
    456 Next Ave


    Any help would be greatly appreciated.

  2. #2
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Grouping rows based on partial match

    Please Login or Register  to view this content.
    Last edited by bheanloh; 10-21-2012 at 11:14 PM.
    Boon

  3. #3
    Registered User
    Join Date
    10-01-2012
    Location
    moon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Grouping rows based on partial match

    Thanks much Boon. The code puts each family member in a separate row with address. The challenge is to have all family members in one row with one address.

    Possible to tweak the code?

    Thanks,
    Bob

  4. #4
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Grouping rows based on partial match

    I think I misunderstood you. What my code did is - group all the people that have the same value (F,F1, or any other value) in the flag column. I think I messed up the whole code, cause I misunderstood the meaning of the flag column. Would you mind explain more on the flag column?
    Last edited by bheanloh; 10-21-2012 at 11:45 PM.

  5. #5
    Registered User
    Join Date
    07-27-2012
    Location
    Malaysia
    MS-Off Ver
    Excel 2007/2010
    Posts
    86

    Re: Grouping rows based on partial match

    Try this. See if this is what you want.
    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    10-01-2012
    Location
    moon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Grouping rows based on partial match

    Thanks a lot, I will try it with a clean batch of data tomorrow and let you know.

    Bob

  7. #7
    Registered User
    Join Date
    10-01-2012
    Location
    moon
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Grouping rows based on partial match

    Hi Boon,

    Finally got to try it, works perfectly thanks much. Could you kindly assist with the following related questions?

    1. If I have a column named GROUP (range offset -4), can each person's or family's group be placed in the adjacent cell next to their name/address?
    Doe GROUP 6
    John, Jane, Sam
    123 Main Street

    Smith, Mary GROUO 1
    456 Next Ave

    2. Any chance of having a different font size for last name and then a different one for first name?

    Thanks again for your time.

    Bob

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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