Help needed on populating a sheet

Hi,

This is my first post so may i say thanks for any help received.

I have got a list of 320 product codes that need organising so i can complete a "related items" database.

so for example, the new york range of products contains the following codes:

example-3202
example-4038
example-1048
example-5827

in order for my database to work i have got to format the products as such

example-3202 | example-4038
example-3202 | example-1048
example-3202 | example-5827
example-4038 | example-3202
example-4038 | example-1048
example-4038 | example-5827
example-1048 | example-3202
example-1048 | example-4038
example-1048 | example-5827
example-5827 | example-3202
example-5827 | example-1048
example-5827 | example-4038

Is there a way to format the data in this fashion without having to manually go through everything?

Many thanks for your help.

Almir's picture

Help needed on populating a sheet

Hi Dan,
If I understood you well you want all your distinct examples to have all possible combinations with other distinct examples, right?
So, for 3202, you want to get three rows, consisting of 3202 and all other three distinct examples (4038, 1048 and 5827).
This requires creating query (database stuff). You may use MS Query from within Excel, or create MS Access database with your original records. Use your original table in query twice and select example-number field from both table, do not make relation between tables and you will get all possible combinations as a result of query.
Store results in the new table. Finally, delete all rows where both columns are equal - you do not need them.
If this is too complicated for you, send me your file and I will get this done for you.