Find partial text match and then list out the header row for the match

gberg

Board Regular
Joined
Jul 16, 2014
Messages
205
Office Version
  1. 365
Platform
  1. Windows
I have a table with headers "1", "2", "3", "4" and "5". The data in the table will be "A", "B", "C", "1", "2" or "3". The data can be a single reference or can be a combination of the items. In another table to the side of the data table I have the headers "A", "B", "C", "1", "2" and "3". I need a formula to list out the data header that the appropriate character is in. The example below (no formulas) shows the desired output. The actual table I have is much larger, I just didn't know how to post the whole thing so I hope this is enough for a formula.


12345ABC123
23BA1C
3​
3​
5​
4​
1​
3​
3BC21A
3​
2​
2​
3​
2​
1​
 

Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).
Try:
Book1
ABCDEFGHIJKL
112345ABC123
223BA1C435413
33BC21A322321
Sheet3
Cell Formulas
RangeFormula
G2:L3G2=TOCOL(IF(ISNUMBER(SEARCH(G$1,$A2:$E2)),$A$1:$E$1,NA()),2)
 
Upvote 0
Solution
Thank you so much for your help, that works great! This board never ceases to amaze me with all the knowledgeable members!
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,152
Members
453,021
Latest member
Justyna P

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