I have a table with the following data (example):
Chris Florida 1 Jamie Texas 1 Samantha Georgia 1 John Maine 1 Jim Wisconsin 1 Steve Nebraska 2 Melanie Florida 2 Hector California 2 Susanna Oregon 3 David Kentucky 3
What I am trying to do is create a table that finds all possible combinations based on the digits in the last column. It should find all possible combinations NOT based on the same number and put them next to each other. Example:
Chris Florida 1 2 Nebraska Steve Chris Florida 1 2 Florida Melanie Chris Florida 1 2 California Hector Chris Florida 1 3 Oregon Susanna Chris Florida 1 3 Kentucky David Jamie Texas 1 2 Nebraska Steve Jamie Texas 1 2 Florida Melanie Jamie Texas 1 2 California Hector Jamie Texas 1 3 Oregon Susanna Jamie Texas 1 3 Kentucky David
And so on until I have all the combinations.