Formula to search table and return multiple column headers
I am trying to enter a certain value in a cell, search a table for that value (vertically and horizontally), then return the column header of the columns containing that value. My formula works, but it will only return 1 column header, and I need it to return multiple Formula: {=INDEX(Sheet2!A1:J31,,MAX(IF(Sheet2!A1:J31=B2,COLUMN(Sheet2!A1:J1)-COLUMN(Sheet2!A1)+1)))} I'm not aware of a built in Excel formula that will do this, but this can be accomplished with a user-defined function. Here is an example dataset, showing the results and the formulas used: Here is the code for the user-defined