Transposing/Index & Matching? Data from Rows to Columns

FuriousD

New Member
Joined
Sep 1, 2016
Messages
35
Office Version
  1. 365
Platform
  1. MacOS
I'd like to use Index/Match or something similar to fix how a report runs for me. I have duplicate data in columns (req number) but unique data associated with it (Approver). How would I accomplish this so I can have each approver in a separate column. I've tried to transpose, but it doesn't give the results in a functional way.

Example - How it is currently formatted

Req NumberApprover Name
123
MacGuyver
123BA Barakus
123AC Slater
321Zach Morris
321Kelly Kapowski

<tbody>
</tbody>

How I need it formatted:

ReqApproverApproverApprover
123MacGuyverBA BarakusAC Slater
321Zach MorrisKelly Kapowski

<tbody>
</tbody>


TIA
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.

Excel 2010
ABCD
1Req NumberApprover Name
2123MacGuyver
3123BA Barakus
4123AC Slater
5321Zach Morris
6321Kelly Kapowski
7
8
9ReqApproverApproverApprover
10123MacGuyverBA BarakusAC Slater
11321Zach MorrisKelly Kapowski 
Sheet4
Cell Formulas
RangeFormula
B10{=IF(COLUMNS($B10:B10)>COUNTIF($A$2:$A$6,$A10),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A10,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B10:B10))))}
B11{=IF(COLUMNS($B11:B11)>COUNTIF($A$2:$A$6,$A11),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A11,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B11:B11))))}
C10{=IF(COLUMNS($B10:C10)>COUNTIF($A$2:$A$6,$A10),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A10,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B10:C10))))}
C11{=IF(COLUMNS($B11:C11)>COUNTIF($A$2:$A$6,$A11),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A11,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B11:C11))))}
D10{=IF(COLUMNS($B10:D10)>COUNTIF($A$2:$A$6,$A10),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A10,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B10:D10))))}
D11{=IF(COLUMNS($B11:D11)>COUNTIF($A$2:$A$6,$A11),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A11,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B11:D11))))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0
You can use formulas to extract the unique values and also to populate the values across:


Book1
ABCD
1Reg NumberApprover Name
2123MacGuyver
3123BA Barakus
4123AC Slater
5321Zach Morris
6321Kelly Kapowski
7
8Req Number
9123MacGuyverBA BarakusAC Slater
10321Zach MorrisKelly Kapowski
Sheet1
Cell Formulas
RangeFormula
A9{=IFERROR(INDEX($A$2:$A$6,MATCH(0,COUNTIF($A$8:$A8,$A$2:$A$6),0)),"")}
B9{=IF($A9="","",IFERROR(INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A9,ROW($A$2:$A$6)-ROW($A$2)+1),COLUMNS($B9:B9))),""))}
Press CTRL+SHIFT+ENTER to enter array formulas.


Copy B9 formula across then copy the entire row down as necessary.

WBD
 
Last edited:
Upvote 0
Oops. That's what happens when you disappear in the middle of answering a question for a coffee break. I wasn't trying to suggest a better answer; they're practically the same anyway!

WBD
 
Upvote 0
THANKS! With some minor modifications to fit my actual spreadsheet, I was able to make this work!

Excel 2010
ABCD
1Req NumberApprover Name
2123MacGuyver
3123BA Barakus
4123AC Slater
5321Zach Morris
6321Kelly Kapowski
7
8
9ReqApproverApproverApprover
10123MacGuyverBA BarakusAC Slater
11321Zach MorrisKelly Kapowski

<colgroup><col style="width: 25pxpx"><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>
Sheet4

Array Formulas
CellFormula
B10{=IF(COLUMNS($B10:B10)>COUNTIF($A$2:$A$6,$A10),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A10,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B10:B10))))}
C10{=IF(COLUMNS($B10:C10)>COUNTIF($A$2:$A$6,$A10),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A10,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B10:C10))))}
D10{=IF(COLUMNS($B10:D10)>COUNTIF($A$2:$A$6,$A10),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A10,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B10:D10))))}
B11{=IF(COLUMNS($B11:B11)>COUNTIF($A$2:$A$6,$A11),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A11,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B11:B11))))}
C11{=IF(COLUMNS($B11:C11)>COUNTIF($A$2:$A$6,$A11),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A11,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B11:C11))))}
D11{=IF(COLUMNS($B11:D11)>COUNTIF($A$2:$A$6,$A11),"",INDEX($B$2:$B$6,SMALL(IF($A$2:$A$6=$A11,ROW($B$2:$B$6)-ROW($B$2)+1),COLUMNS($B11:D11))))}

<thead>
</thead><tbody>
</tbody>
Entered with Ctrl+Shift+Enter. If entered correctly, Excel will surround with curly braces {}.
Note: Do not try and enter the {} manually yourself

<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,214,606
Messages
6,120,492
Members
448,967
Latest member
visheshkotha

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