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.