简体   繁体   中英

Lookup multiple columns and sum their values in excel

I have the following three names which I would like to lookup their names and sum under cell D2. 电子表格

The lookup table (Table1) 查找表

Everything I've found online which deals with summing lookup values is to do with summing multiple columns in the lookup table ie =SUMPRODUCT(VLOOKUP(D2,Table1,{2,3},0)) .

I'm trying to accomplish the following: =VLOOKUP(E5,Table1,2,FALSE)+VLOOKUP(F5,Table1,2,FALSE)+VLOOKUP(G5,Table1,2,FALSE) but wanted to see if there is an easier way possibly with arrays as theis would cause problems when there are hundreds of columns.

I've also tried this with Index/Match but again all the issues I've found online deal with summing columns in the lookup table based on one reference.

What's wrong with SUMPRODUCT ? You could just use for example:

=SUMPRODUCT((Table1[Name]=A2:C2)*(Table1[Age]))

在此处输入图片说明

Let me know if I misinterpreted the question.

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