Rekcs
Rekcs

Reputation: 879

SUM values with VLOOK

I have an Excel sheet with monthly costs per food. The goal is, on a part sheet, to calculate the value of each food in every month. With a formula I am using at the moment =SUM(VLOOKUP (A3; Food! C3: K3000; 7; 0)), it is only looking for a relative value in the first month and not in the total of all months.

To clarify the formula:

  1. A3 is the food I'm looking for;
  2. Food! C3: K3000 is the range of the table where I am looking for the data;
  3. Finally, 7 will be the column index where the amount spent per month is.

This is what I have in Food sheet:

enter image description here

I think there is no extra information. If something else is left, please tell me.

That's the result I want:

enter image description here

Upvotes: 1

Views: 72

Answers (1)

basic
basic

Reputation: 11968

You can use SUMIF:

=SUMIF($B$3:$B$11;G3;$C$3:$C$11)

enter image description here

Upvotes: 2

Related Questions