# Vlookup Multiple Values?

#### AboveBeyond

##### Board Regular
Is Vlookup or Sumif capable of having multiple lookup values?

For example.

I want vlookup to look these values: apple, oranges, grapes

So to illustrate that in a formula (even though its wrong):
Vlookup((apples,oranges,grapes),A:B,2,false)

### Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

##### MrExcel MVP
Is Vlookup or Sumif capable of having multiple lookup values?

For example.

I want vlookup to look these values: apple, oranges, grapes

So to illustrate that in a formula (even though its wrong):
Vlookup((apples,oranges,grapes),A:B,2,false)

What result do you expect to see?

#### AboveBeyond

##### Board Regular
I guess it would more of a SumIF then a Vlookup.

Example:

Fruit - Cost
Apples - \$10
Oranges - \$25
Grapes - \$5
Watermelons - \$7
Berries - \$2

Sumif Apples, oranges, and berries. This would equal (10+25+2) = \$37.

I'm trying to find a way to create a sumif in one formula rather than putting mutliple sumif for each lookup value.

##### MrExcel MVP
I guess it would more of a SumIF then a Vlookup.

Example:

Fruit - Cost
Apples - \$10
Oranges - \$25
Grapes - \$5
Watermelons - \$7
Berries - \$2

Sumif Apples, oranges, and berries. This would equal (10+25+2) = \$37.

I'm trying to find a way to create a sumif in one formula rather than putting mutliple sumif for each lookup value.

Try...

Either:

=SUM(SUMIF(\$A\$2:\$A\$7,{"Apples","Oranges","Berries"},\$B\$2:\$B\$7))

Or:

=SUMPRODUCT(SUMIF(\$A\$2:\$A\$7,List,\$B\$2:\$B\$7))

where List stands for a range housing the items Apples, Oranges, and Berries.

Thank you!

Replies
6
Views
86
Replies
13
Views
192
Replies
1
Views
103
Replies
3
Views
83
Replies
9
Views
157

1,129,587
Messages
5,637,272
Members
416,963
Latest member
samfuge

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back