Sum up similar values in VLOOKUP/INDEX-MATCH excel functions

爷,独闯天下 提交于 2019-12-08 06:52:41

问题


I have an issue with a vlookup/index-match formula in excel 2010.

I have a table that contains duplicate values in the name column. I have a table in another sheet that reference the name & amount from the first sheet. in case a duplicate name exist in the original table, it should sum the amount.

For example, look at the pic below. ABC is a duplicate name, and it's amount should be zero. How can I use Vlookup/index-match formulas in order to display "0" in the result when I lookup the name ABC?

In the destination sheet, the name only appears once, hence I don't want to add another ABC to the dest table.

Thanks ! Roni.

回答1:


VLOOKUP and or INDEX/MATCH will only return you one entry (the first match) - so you cannot use it for summing (unless in an array formula).

However, using SUMIFS (or in Excel 2003 and earlier SUMIF) will be just what you need: So In F2, you could write:

=SUMIFS($C$2:$C$6,$B$2:$B$6,E2)


来源:https://stackoverflow.com/questions/14815705/sum-up-similar-values-in-vlookup-index-match-excel-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!