Pulling a sequential list of cell data from the intersection of columns and rows

Schopenhauer

New Member
Joined
Jun 15, 2015
Messages
4
I've been trying to use INDEX and MATCH to get this done, but I can't create an output in the format I'm trying to accomplish.

Here's what I'm trying to do (apologies for the cruddy formatting):


Black White Red Orange Yellow

Chevy 200 400 500 390 122

Ford 400 300 450 700 500

Dodge 410 600 800 400 600

VW 600 400 775 210 450

Toyota 500 444 890 400 610


Here's what I'm trying to accomplish:


Output Desired:

Black Chevy 200
Black Ford 400
Black Dodge 410
Black VW 600
Black Toyota 500
White Chevy 400
White Ford 300
White Dodge 600
*
*
*
*
Yellow Dodge 600
Yellow VW 450
Yellow Toyota 610

Basically, I need a list that will compile all date in order, in one long column. Is this even possible? I've been researching this for a couple days now, and can't find anything that can quite get it to work. Maybe using HLOOKUP and MATCH? Not sure how to solve this one.

Thank you!

-Brad
 
Last edited:

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
See if this macro will work for you

Code:
Sub t()
Dim sh As Worksheet, i As Long, j As Long, lr As Long
Set sh = Sheets(1)
lr = sh.Cells(Rows.Count, 1).End(xlUp).Row
    r = 2
    For i = 2 To 5
        For j = 2 To lr
            Sheets(2).Cells(r, 1) = sh.Cells(1, i)
            Sheets(2).Cells(r, 2) = sh.Cells(j, 1)
            Sheets(2).Cells(r, 3) = sh.Cells(j, i)
            r = r + 1
        Next
    Next
End Sub
 
Last edited:
Upvote 0
That worked like a charm, JLG!! Thank you!!
If you are interested, there is a formula solution that will also work. Put this formula in cell A8 and copy it down to cell A32...

=INDEX(B$1:F$1,1,1+INT((ROWS($8:8)-1)/5))&" "&INDEX(A$2:A$6,1+MOD(INT(ROWS($8:8)-1/5),5))&" "&INDEX(B$2:G$6,1+MOD(INT(ROWS($8:8)-1/5),5),1+MOD(INT((ROWS($8:8)-1)/5),5))
 
Upvote 0

Forum statistics

Threads
1,214,800
Messages
6,121,641
Members
449,044
Latest member
hherna01

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