Pulling Multiple Column Headers

sfm456

New Member
Joined
Apr 4, 2016
Messages
2
ABCDEF
IDNamePlanDesignBuildTest
1AppleLATELATE
2Orange LATECOMPLETE
3BananaLATE
4PearLATECOMPLETE
5StrawberryLATE

<tbody>
</tbody>

I am working with the table above and am trying to use an index array to get to this output:

ALL LATE ITEMS
IDScope NamePhase
1AppleDesign
1AppleBuild
2OrangeDesign
3PearPlan
4BananaPlan
5StrawberryPlan

<colgroup><col><col><col></colgroup><tbody>
</tbody>

It feels like it should be so simple and I can't figure it out!

Right now I have
=IFERROR(INDEX($C$3:$I$3,SMALL(IF(C4:I4="LATE",COLUMN($C$1:$I$1)-COLUMN($C$1)+1),ROWS($B$1:B1))),"")





<colgroup><col><col><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

Get help while writing formula
Click the italics "fx" icon to the left of the formula bar to open the Functions Arguments dialog. Help is displayed for each argument.
if there is a large amount of data, suggest you avoid formulas and work with a query or query table. I think the name (query or query table) will vary depending on your excel version

anyway, SQL for it could be like

Code:
SELECT ID, Name, 'Plan' AS [Phase]
FROM your_table
WHERE Plan = 'LATE'
UNION ALL
SELECT ID, Name, 'Design'
FROM your_table
WHERE Design = 'LATE'
SELECT ID, Name, 'Build'
FROM your_table
WHERE Build = 'LATE'

This will readily handle huge data volumes & needs to be refreshed like a pivot table. Can be set up via ALT-D-D-N and follow the wizard. Easier if you give your data a normal (non-dynamic) named range before starting. or you can use a worksheet name instead. syntax is like [sheetname$] in place of where I've written your_table

hth
 
Upvote 0
Put all ID in column J and Scope name in column K , Phase in Column L

ABCDEF
IDNamePlanDesignBuildTest
1AppleLATELATE
2OrangeLATECOMPLETE
3BananaLATE
4PearLATELATE
5StrawberryLATE

<tbody>
</tbody>

JKL
IDScope NamePhase
1AppleDesign
1AppleBuild
2OrangeDesign
3PearPlan
4BananaPlan
5StrawberryDesign

<colgroup><col width="64" span="3" style="width:48pt"> </colgroup><tbody>
</tbody>
In L2 put this formula with array
Code:
=INDEX($C$1:$F$1,SMALL(IF(INDIRECT("C"&MATCH(K2,$B$2:$B$6,0)+1&":F"&MATCH(K2,$B$2:$B$6,0)+1)="LATE",COLUMN(C2:F2)-2),COUNTIF($K$1:K2,K2)))
 
Upvote 0

Forum statistics

Threads
1,214,970
Messages
6,122,514
Members
449,088
Latest member
RandomExceller01

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