Reporting a list

O177812

Board Regular
Joined
Apr 16, 2015
Messages
82
Office Version
  1. 365
  2. 2021
Hi, I have data that looks like the following

ITEMSIZECOLORPACKAGEDTINTAGESACCESSORIESWASHABLEERRORS
54452LGBLUEERRORBLACKERRORERRORYESPACKAGED, AGES, ACCESSORIES
64152SMREDYESREDALLYESYES
12542ERRORERRORYESBLUE12&UPYESNOSIZE, COLOR

<tbody>
</tbody>

The results that I need to achieve are in RED.

Basically I need to list that header for any item that contains the word "Error"

this is what I have so far but it only list the first instance instead of all of the instances:

=IFERROR(INDEX($B$1:$AO$1,MATCH(TRUE,INDEX($B3:$AO3="ERROR",0),0)),"")

Help is greatly appreciated.
 

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.
O177812,

I was able to get the following to work:


Excel 2010
ABCDEFGHI
1ITEMSIZECOLORPACKAGEDTINTAGESACCESSORIESWASHABLEERRORS
254452LGBLUEERRORBLACKERRORERRORYESPACKAGED, AGES, ACCESSORIES
364152SMREDYESERRORALLYESYESTINT
412542ERRORERRORYESBLUE12&UPYESERRORSIZE, COLOR, WASHABLE
Sheet1
Cell Formulas
RangeFormula
I2{= SUBSTITUTE(TRIM(SUBSTITUTE(IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(B$2)-1)),"")&", "&IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(C$2)-1)),"")&", "&IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(D$2)-1)),"")&", "&IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(E$2)-1)),"")&", "&IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(F$2)-1)),"")&", "&IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(G$2)-1)),"")&", "&IFERROR(INDEX($B$1:$H$1,1,SMALL(IF($B2:$H2="ERROR",COLUMN($B$1:$H$1)-COLUMN($B$1)+1),COLUMN(H$2)-1)),""), ",", " "))," ", ", ")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,203,655
Messages
6,056,571
Members
444,877
Latest member
kat517

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