Forum Discussion
anna3155
Apr 21, 2022Copper Contributor
Sum of multiple rows using VLOOKUP
We are trying to use VLOOKUP in order to retrieve the multiple values. We have a value that we are looking for and we want to have the sum from all the cells that this value is related to. For exampl...
- Apr 21, 2022
You can use something like
=SUMIFS(range_with_numbers, range_with_colors, "Green", other_range, "<>Apple")
if you only want to sum numbers where the color is green and another column does not contain Apple.
HansVogelaar
Apr 21, 2022MVP
anna3155
Apr 21, 2022Copper Contributor
Hello,
Thank you. What do I use if I want to exclude som of the cells that are included if I use "SUMIF"?
Thank you. What do I use if I want to exclude som of the cells that are included if I use "SUMIF"?
- mtarlerApr 21, 2022Silver ContributorYou can use SUMIFS() if you have multiple criteria and you can also use FILTER()
=SUMIFS(range-to-sum, range-with-colors, "Green", range-with-other-info, other-criteria, ...)
=SUM( FILTER(range-to-sum, (range-with-colors = "Green")*(range-with-other-info = other-criteria)*... , 0) )- anna3155Apr 21, 2022Copper ContributorOkay thank you.
Is there any other option if I want to just exclude one criteria? or do I have to enter all the criteria that I want to include?- HansVogelaarApr 21, 2022MVP
You can use something like
=SUMIFS(range_with_numbers, range_with_colors, "Green", other_range, "<>Apple")
if you only want to sum numbers where the color is green and another column does not contain Apple.