Return header for column value is found in

47Problem

New Member
Joined
May 12, 2016
Messages
2
Have found solutions when it is known what row a value is one but what I am looking for is searching 4+ columns in a table to determine the header of the column in which the value resides. Example(s): 9 = "Guest Circuit ID", 7 = "Primary Circuit ID", 2 = "Backup Circuit ID"

Ultimately this would be best if tied into results in a pivot table so assigning a value using Name Manager might next practical step once it is determined how to find value. I thought an index/match would solve this issue but have been unable to make work. Cells will be alphanumeric as well and may include symbols.


Primary Circuit ID Backup Circuit ID Guest Circuit ID Primary Router Name
1234
78910
13141516
19202122

<colgroup><col><col><col><col></colgroup><tbody>
</tbody>
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Match can only search one dimension, sumproduct will work here if each term doesn't repeat.

e.g.:


Excel 2010
ABCDEF
1Primary Circuit IDBackup Circuit IDGuest Circuit IDPrimary Router Name
21234
378910
413141516
519202122
6
7
89Guest Circuit ID
Sheet5
Cell Formulas
RangeFormula
F8=INDEX($A$1:$D$1,SUMPRODUCT(($A$2:$D$5=E8)*COLUMN($A$2:$D$5)))
 
Last edited:
Upvote 0
I think that is definitely headed in the direction that I need however 'sumproduct' will not work with alphanumeric will it? I have updated the table in the quoted area below with better references (should have used more realistic values to start with).

Match can only search one dimension, sumproduct will work here if each term doesn't repeat.

e.g.:

Excel 2010
ABCDEF
1Primary Circuit IDBackup Circuit IDGuest Circuit IDPrimary Router Name
2m12-4413i4421ic0302powermusic3
3m12-4417iw252ic2042air4423
4m12-4419i3312ig2052media0022
5m12-4412iw9303i-3411media9921
6
7
8i3312Backup Circuit ID

<colgroup><col style="width: 25pxpx"><col><col><col><col><col><col></colgroup><thead>
</thead><tbody>
</tbody>

Sheet5

Worksheet Formulas
CellFormula
F8=INDEX($A$1:$D$1,SUMPRODUCT(($A$2:$D$5=E8)*COLUMN($A$2:$D$5)))

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>
 
Upvote 0
Hi 47Problem,
Can you use this? Hope this helps.
Mike Szczesny


Excel 2012
ABCDEF
1abcd14
21234
35678
49101112b
513141516
Sheet1
Cell Formulas
RangeFormula
F4{=INDEX($A$1:$D$1,,SMALL(IF($A$2:$D$5=$F$1,COLUMN($A$1:$D$1)-COLUMN($A$1)+1),1))}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Excel 2016
ABCD
1Primary Circuit IDBackup Circuit IDGuest Circuit IDPrimary Router Name
21234
378910
413141516
519202122
6
7
8Lookup Value21
9ResultGuest Circuit ID
10
Sheet4
Cell Formulas
RangeFormula
B9=INDEX($A$1:$D$1,SUMPRODUCT(--EXACT(B8,$A$2:$D$5)*(COLUMN($A$2:$D$2)-COLUMN($A$2)+1)))
 
Upvote 0

Forum statistics

Threads
1,215,061
Messages
6,122,922
Members
449,094
Latest member
teemeren

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