Question using VLOOKUP with criteria/repeating values

PedroTrigo

New Member
Joined
Jan 8, 2019
Messages
3
Hello all!

I need some help using VLOOKUP (or other function) to sum repeating values. Below is some data as an example.
My goal is to look up the value in column 'Material' and sum the corresponding quantity for 'Material 2'. The Vlookup function works fine, except when there are repeating values. In the table below I highlighted one of those exceptions.

Im using the formula - (VLOOKUP(A4;A:D;4;FALSE)) - which only returns the first value: 283. The result im trying to get is 600 (283+317)

Is there any way to do this? Maybe add a VLOOKUP from down to up to the formula?

Would very much appreciate some help with this problem. Thanks in advance!


Material
Line
Material 2
Qty
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16127
10080.70.010

<colgroup><col width="113"></colgroup><tbody>
</tbody>
283
14110.90.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16127
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
283
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16127

<tbody>
</tbody>
10080.40.022

<colgroup><col width="113"></colgroup><tbody>
</tbody>
283
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16127

<tbody>
</tbody>
10080.40.023

<colgroup><col width="113"></colgroup><tbody>
</tbody>
283
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16127

<tbody>
</tbody>
10080.40.028

<colgroup><col width="113"></colgroup><tbody>
</tbody>
283
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16128
10080.70.301

<colgroup><col width="113"></colgroup><tbody>
</tbody>
317
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16128
10080.70.501

<colgroup><col width="113"></colgroup><tbody>
</tbody>
317
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16128
10080.40.022

<colgroup><col width="113"></colgroup><tbody>
</tbody>
317
14110.71.001

<colgroup><col width="113"></colgroup><tbody>
</tbody>
16128
10080.40.023

<colgroup><col width="113"></colgroup><tbody>
</tbody>
317

<tbody>
</tbody>
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I figured I could, but after messing around with the functions I couldnt get the correct values.
Could you elaborate please?
 
Upvote 0
Assuming your data is in range A1:D10 then
=SUMIFS(D:D,A:A,A4,C:C,C4)

will return the result of 600.



<tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,215,425
Messages
6,124,825
Members
449,190
Latest member
rscraig11

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