excel - Horizontal Index Match (returning column header) -
b c 1 fruit color meat <- column header 2 banana red pork 3 apple black chicken 4 orange white beef
from table1 above table2 below:
b 1 name what? <- column header 2 banana fruit <- formula should return these values, based on table 1 3 red color 4 beef meat 5 pork meat
looking formula return corresponding column name in b2,3,4...
tried =index(table1[#headers],match(j:j,table1,0))
it seem 3 columns unique; e.g. there never beef in color column. in case can query each column, passing 1, 2 or 3 case may be.
=iferror(index(table1[#headers], isnumber(match([@name], table1[fruit], 0))*1+ isnumber(match([@name], table1[color], 0))*2+ isnumber(match([@name], table1[meat], 0))*3), "no column")
i'm not sure whether port intentional misspelling demonstrate occurs when there no match.
Comments
Post a Comment