I have an Excel spreadsheet that looks something like this:
| | Job1 | Job2 | Job3 | Job4 | Job5 |
| Job1 | | | | | |
| Job2 | | | | | |
| Job3 | | | | | |
| Job4 | | | | | |
| Job5 | | | | | |
The cells between each row and column are different colors. I need to sort each column by the color orange and then copy the row names to a new sheet.
So in the end I would have a sheet like this:
| Job1 | Job2 |
| Job1 | Job4 |
| Job1 | Job5 |
| Job2 | Job3 |
| Job2 | Job5 |
The idea is if you can do Job1 you should have access to Job2. That is determined by the intersection between column and row from the first sheet. Try to have a sheet that shows the names instead of the colors. In all there are 83 jobs so manually doing this would have me copying over 4000.
Does anyone know how to create a macro to autofilter by color one column at a time and copy the contents of the row in column A1 to a new sheet?
I tried to make some sense of the actual data from your description and sample data/results. This is what I came up with.
With that as the active worksheet, I ran this macro.
This created a new worksheet at the end of the worksheet collection with the following results.
To my mind, there isn't much point in having columns E:F in the original data as any relationship noted there would already have been discovered in its reverse through the first three columns but I suppose that data redaction might account for the redundancy. Or I could be completely wrong in my assumptions as the data sample was not noted as to which cells in the matrix actually contained orange color backfill. Perhaps you will be able to transcribe this for your own purposes. Post back with questions and specifics if you run into difficulty.
I ended up making a web interface and converting everything over to a SQL database. So the SQL database and logic could do all this instead of trying to put excel on steroids.