Vlookup Multiple Values?

AboveBeyond

Board Regular
Joined
Aug 14, 2007
Messages
114
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.

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
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
Joined
Aug 14, 2007
Messages
114
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.
 

Aladin Akyurek

MrExcel MVP
Joined
Feb 14, 2002
Messages
85,203
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.
 

Watch MrExcel Video

Forum statistics

Threads
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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top