Look at mutiple columns and return column header where the text matches

jezmechanic

New Member
Joined
May 7, 2019
Messages
5
Hi Folks

I am looking for some help.

So in "Case" tab I have a list of cases the company are dealing with. In column "I" within this tab contains the name of the worker who dealt with the case. In a separate tab ("Team Sheets") I have all the workers in the company listed based on which team they are in (example - Column "A" header is "Steve's Team" then below is a list of all the workers in Steve's team). I am looking for a formula that will look at the name of the worker within the "Case" tab (Column "I"), cross reference with the "Team Sheets" tab and return the header for whatever column the workers name matched.

Thanks
Jez
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Welcome to Mr Excel forum

Could you tell us where are the headers (row) and data (rows/columns) in Team Sheets tab?

M.
 
Upvote 0
Hi Marcelo, thank you.

Yeah so the columns in "Team Sheets" are columns A:P and the managers name are row 2 for each column followed by the workers listed immediately below.

Thanks
Jez
 
Upvote 0
Ok
Headers in A2:P2
Question
How many rows of data do you have? Rows 3 to 100, for example

M.
 
Upvote 0
Maybe something like this

Team Sheets tab

A
B
C
1
2
Steve's team​
Mark's team​
....​
3
Bob​
Mary​
4
John​
Richard​
5
William​
6

Case tab

I
J
1
Names​
Team​
2
Bob​
Steve's team​
3
Mary​
Mark's team​
4
John​
Steve's team​
5
Richard​
Mark's team​
6
William​
Mark's team​

Formula in J2 copied down
=INDEX('Team Sheets'!$A$2:$P$2,AGGREGATE(14,6,('Team Sheets'!$A$3:$P$17=I2)*COLUMN('Team Sheets'!$A$2:$P$2),1))

Hope this helps

M.
 
Upvote 0

Forum statistics

Threads
1,215,659
Messages
6,126,068
Members
449,286
Latest member
Lantern

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