Reputation: 2663
I have the above grid in Excel..I would like to find a formula that would allow me to use the name in column A as a look up value, and return the value in Row 1 which is chosen by that person (i.e. a "1" in the column).. Like shown below:
Any ideas?
Upvotes: 0
Views: 97
Reputation: 35853
Use this formula, say, in I2
and grag it down:
=INDEX($B$1:$H$1,1,MATCH(1,B2:H2,0))
OR, if you have somewhere unsorted list of names and want to get choosen item, there is another formula:
=INDEX($B$1:$H$1,1,MATCH(1,INDEX($B$2:$B$8,MATCH(J2,$A$2:$A$8,0)):INDEX($H$2:$H$8,MATCH(J2,$A$2:$A$8,0)),0))
where your unsorted list of names started at J2
. Write above formula in K2
and drag it down as shown in image below:
Upvotes: 3
Reputation: 1903
But if you want to get the Item based on name, you can write:
=INDEX($B$1:$H$1;MATCH(1;OFFSET($B$2:$H$7;MATCH(I7;$A$2:$A$7;0)-1;0;1);0))
In this case you get the Item based on name in I7
Upvotes: 0