简体   繁体   中英

Search on multiple Vlook up columns or Index on Google Sheets or Excel

I have this data in Google Sheets

name    Id1      Id2       Id3
Simon   ID0002             ID0001   
Bob              ID003
Roger   ID004              ID005
Jim     IDO006  

How can i do a multiples Vlookup or Index search to return the column name?

Searchkey   Name
ID0001     Simon
ID0002     Simon
ID003       Bob
ID004      Roger
ID005      Roger
IDO006      Jim

Heres my link : https://docs.google.com/spreadsheets/d/1VSP1OiuXTf4CxEKVC-KIKp98EU9jTsj9VOTXz7GxSC8/edit?usp=sharing

Use SUMPRODUCT() with INDEX() function. Try below-

=INDEX($A$1:$A$5,SUMPRODUCT(ROW($B$1:$D$5)*($B$1:$D$5=H4)))

在此处输入图片说明

This will work both on Excel and Google Sheet .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM