Function to result column header based on text in a column

cb743

New Member
Joined
Apr 8, 2019
Messages
1
Hello, I am relatively new to excel. I want to create a function that will search for a name and result the heading (team).


CapitalsWizardsNationalsRedskins
JamesCoreyHannahTest1
MikeAmyTest3Test2

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
Each heading will have around 10 users.

An example of the end result that I want is insert corey into a cell and have it output the team corey is on
UserTeam

<tbody>
</tbody>
 

Excel Facts

What is the last column in Excel?
Excel columns run from A to Z, AA to AZ, AAA to XFD. The last column is XFD.
one way

Excel 2016 (Windows) 32 bit
A
B
C
D
E
F
G
H
1
CapitalsWizardsNationalsRedskins.UserTeam Formula (copied down)
2
N001N101N201N301N313Redskins=IF(COUNTIF(A:A,F2)>0,$A$1,IF(COUNTIF(B:B,F2)>0,$B$1,IF(COUNTIF(C:C,F2)>0,$C$1,IF(COUNTIF(D:D,F2)>0,$D$1,"Not Found"))))
3
N002N102N202N302N004Capitals
4
N003N103N203N303N312Redskins
5
N004N104N204N304MateyNot Found
6
N005N105N205N305
7
N006N106N206N306
8
N007N107N207N307
9
N008N108N208N308
10
N009N109N209N309
11
N010N110N210N310
12
N011N111N211N311
13
N012N112N212N312
14
N013N113N213N313
15
N014N114N214N314
Sheet: Sheet1
 
Upvote 0
Welcome to the forum! Here is another option you can try.


Excel 2013/2016
ABCDEFG
1CapitalsWizardsNationalsRedskinscoreyWizards
2JamesCoreyHannahTest1
3MikeAmyTest3Test2
Sheet1
Cell Formulas
RangeFormula
G1=INDEX($A$1:$D$1,AGGREGATE(15,6,COLUMN($A$1:$D$1)-MIN(COLUMN($A$1:$D$1))+1/($A$1:$D$3=F1),1))
 
Upvote 0

Forum statistics

Threads
1,214,983
Messages
6,122,592
Members
449,089
Latest member
Motoracer88

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