user3623300
user3623300

Reputation: 379

Get value from cell next to another cell

I've got two sheets.

SHEET ONE

Product    | Grams    | Kcal
Food       | 23       | ?
Food2      | 55       | ?

SHEET TWO

Product    | Kcal
Food       | 104
Food2      | 33

How can I in Sheet One find the cell next to the food I entered.
Ex. When I enter "Food2", I want it to automatically get the Kcal value from the Food list in my Sheet Two.

So Food2's Kcal cell should be like 33*55

Upvotes: 0

Views: 83

Answers (1)

Chris Hick
Chris Hick

Reputation: 3094

Try this formula in cell C2 of your Sheet1:

=ArrayFormula(IF(A2:A="",,B2:B*VLOOKUP(A2:A,Sheet2!A:B,2,0)))

Upvotes: 1

Related Questions