Can't Find Summed Value of 2 Largest Numbers in Vlookup

bencar

Banned user
Joined
Jun 8, 2016
Messages
149
I'm trying to use vlookup to lookup a value that sums up the 2 largest numbers in columns B,C and D. I tried these 2 formulas on my own but thet dont work. I also tried using them as array functions. But still doesnt work. How can I make this work?

=sum(VLOOKUP(E9,A2:D5,{LARGE(B2:D2,{1,2})},0))
=sum(VLOOKUP(E9,A2:D5,(LARGE(B2:D2,{1,2}),0))



ABCD
1ThrowerThrow 1Throw 2Throw 3
2Daniel45.9923.7851.02
3Richard40.2242.3243.69
4Matt37.5534.231.5
5Stevie69.43056.11

<tbody>
</tbody>

 
Last edited:
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

E9? I dont have anything in E9. I just want to make this possible with vlookup not match index.

This is your own formula in post #1 :

=sum(VLOOKUP(E9,A2:D5,{LARGE(B2:D2,{1,2})},0))

What do you think you have in E9?
 
Upvote 0

Excel Facts

VLOOKUP to Left?
Use =VLOOKUP(A2,CHOOSE({1,2},$Z$1:$Z$99,$Y$1:$Y$99),2,False) to lookup Y values to left of Z values.
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

This is your own formula in post #1 :

=sum(VLOOKUP(E9,A2:D5,{LARGE(B2:D2,{1,2})},0))

What do you think you have in E9?

What do I "think" I have in E9? Theres nothing in E9. After I hit enter I get an error message. But nothing in E9.
 
Last edited:
Upvote 0
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

What do I "think" I have in E9? Theres nothing in E9. After I hit enter I get an error message. But nothing in E9.

VLOOKUP expects a look up value it can look for in a table. Let's leave this E9 business.

What is the expected value for the data in A2:D5 you posted?
 
Upvote 0
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

VLOOKUP expects a look up value it can look for in a table. Let's leave this E9 business.

What is the expected value for the data in A2:D5 you posted?

Seriously I dont know what youre talking about. I really dont. Youre saying things which go over my head. If you dont know the answer thats fine. I'll wait for someone who does.
 
Upvote 0
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

Seriously I dont know what youre talking about. I really dont. Youre saying things which go over my head. If you dont know the answer thats fine. I'll wait for someone who does.

You posted this data in post #1 ...

Row\Col
A​
B​
C​
D​
2​
Daniel
45.99
23.78
51.02
3​
Richard
40.22
42.32
43.69
4​
Matt
37.55
34.2
31.5
5​
Stevie
69.43
0
56.11

And you said:

"I'm trying to use vlookup to lookup a value that sums up the 2 largest numbers in columns B,C and D."

So, I'm asking: What is the value that must be returned?
 
Upvote 0
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

I'm confused. I needed vlookup not match index.

The combination of INDEX and MATCH is the proper solution to your problem because the INDEX function is able to return an array of values provided we use a 0 (zero) as its 3rd argument (column_num)

For clarity I'll repeat the solution in post 9

A
B
C
D
E
F
G
1
Thrower​
Throw 1​
Throw 2​
Throw 3​
Thrower​
Result
2
Daniel​
45,99​
23,78​
51,02​
Daniel​
97,01​
3
Richard​
40,22​
42,32​
43,69​
Matt​
71,75​
4
Matt​
37,55​
34,2​
31,5​
5
Stevie​
69,43​
0​
56,11​
6

<tbody>
</tbody>


Formula in G2 copied down
=SUMPRODUCT(LARGE(INDEX(B$2:D$5,MATCH(F2,A$2:A$5,0),0),{1;2}))

Observe that a 0 is used as the 3rd parameter of the INDEX function. This zero forces the INDEX function to return an array of values, that is, the values of all columns of the range, in the row corresponding to the lookup_value used in the MATCH function. For example, when the lookup_value is Daniel, the index function returns B2:D2; in the case of Matt it returns B4:D4.

This array is passed to the LARGE function that returns the largest and the second largest.

At last, SUMPRODUCT adds these two values.

To see what the formula does, step by step, try Formulas > Evaluate formula

M.
 
Upvote 0
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

for someone asking a question and expecting help, original poster is quite irritable
 
Upvote 0
I'm trying to use vlookup to lookup a value that sums up the 2 largest numbers in columns B,C and D. I tried these 2 formulas on my own but thet dont work. I also tried using them as array functions. But still doesnt work. How can I make this work?

=sum(VLOOKUP(E9,A2:D5,{LARGE(B2:D2,{1,2})},0))
=sum(VLOOKUP(E9,A2:D5,(LARGE(B2:D2,{1,2}),0))


ABCD
1ThrowerThrow 1Throw 2Throw 3
2Daniel45.9923.7851.02
3Richard40.2242.3243.69
4Matt37.5534.231.5
5Stevie69.43056.11

<tbody>
</tbody>


Hi!

If I understand correctly what you want, then the formulas below can helps:

=SUMPRODUCT(LARGE(VLOOKUP(E9,$A$2:$D$5,{2;3;4},0),{1;2}))

Use Ctrl+Shift+Enter to enter the formula

=SUM(LARGE(VLOOKUP(E9,$A$2:$D$5,{2;3;4},0),{1;2}))

Markmzz
 
Upvote 0
Re: How Do I Find Summed Values of 2 Largest Numbers in Vlookup

Why do you ‘need’ to use vlookup ?

Because that's how it is formulated in the assignment.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,905
Messages
6,122,172
Members
449,071
Latest member
cdnMech

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
Back
Top