VBA Algorithm Help

java568

New Member
Joined
Aug 3, 2011
Messages
11
Here's the simple set-up: 3 columns of names

Here's what I would like to do:
-I would like to group these names by "family" in another worksheet
-Here's my definition of family: a family is a group of rows that are connected by the same names (although they do not have to all share the same name, just be connected by a name to another row that does).
-Example: If row 1 has name "A" in one of its columns, and row 3 has name "A" in one of its columns and name "B" in another one of its columns, and row 5 has name "B" in one of its columns but not "A" then 1, 3 and 5 are still a family. Does that make sense?

This is basically for an application of companies where I'm trying to narrow down companies that are connected to teach other in any way and post them all in one row in another worksheet. Does anyone have any ideas about how to make an algorithm that can do this quickly?

Thanks! I realize my explanation kind of sucks, but I could not think of any other way to word it.
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
How many name columns does each row have? Which ones?
How many other columns of data?

Does each name column have a unique header? (i.e. is it accessible to AdvancedFilter)
Is there a unique identifier for each row?
 
Upvote 0
There's a variable number of columns for each row (the excel sheet expands to the right and is continually added to), but we're only concerned with the first three. The rest of the data does not be searched.

Each of the first three columns does have a unique header located in the 4th row, but the rows do not have unique identifiers. None of the rows will have the same three names in all three columns, but they can have duplicate names within one or two of the columns.
 
Upvote 0

Forum statistics

Threads
1,224,566
Messages
6,179,553
Members
452,928
Latest member
101blockchains

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top