Calculating using VLOOKUP

Copper Contributor

So I have the table in the picture below, and I used the VLOOKUP to get the count of the "Spirulina 120" for example but when I'm doing it, it just giving me the first value while I want to calculate all the amount of it.

I was going to do it manually but I have more than 500 rows.

This is the what I did -I know it's wrong BTW-

=VLOOKUP(E2,A2:B19,2,FALSE)

2 Replies

@VortexNR 

  • You can apply the criteria to one range and sum the corresponding values in a different range. For example, the formula =SUMIF(B2:B5, "Spirulina 120", C2:C5) sums only the values in the range C2:C5, where the corresponding cells in the range B2:B5 equal "Spirulina 120".
  • To sum cells based on multiple criteria, see SUMIFS function.

Hi @VortexNR ,

You can do this in a couple of ways - Pivot or sumIf/s.. the VLOOKUP can't help you now...

see attachment: