Calculating using VLOOKUP

%3CLINGO-SUB%20id%3D%22lingo-sub-2101349%22%20slang%3D%22en-US%22%3ECalculating%20using%20VLOOKUP%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2101349%22%20slang%3D%22en-US%22%3E%3CP%3ESo%20I%20have%20the%20table%20in%20the%20picture%20below%2C%20and%20I%20used%20the%20%3CSTRONG%3EVLOOKUP%3C%2FSTRONG%3E%20to%20get%20the%20count%20of%20the%20%22%3CSTRONG%3ESpirulina%20120%3C%2FSTRONG%3E%22%20for%20example%20but%20when%20I'm%20doing%20it%2C%20it%20just%20giving%20me%20the%20first%20value%20while%20I%20want%20to%20calculate%20all%20the%20amount%20of%20it.%3C%2FP%3E%3CP%3EI%20was%20going%20to%20do%20it%20manually%20but%20I%20have%20more%20than%20500%20rows.%3C%2FP%3E%3CP%3EThis%20is%20the%20what%20I%20did%20-I%20know%20it's%20wrong%20BTW-%3C%2FP%3E%3CP%3E%3DVLOOKUP(E2%2CA2%3AB19%2C2%2CFALSE)%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2101349%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
Occasional Visitor

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: