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!


[TABLE="width: 500, align: center"]
<tbody>[TR]
[TD]Material
[/TD]
[TD]Line
[/TD]
[TD]Material 2
[/TD]
[TD]Qty
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD="align: center"]16127
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]10080.70.010
[/TD]

</tbody>
[/TD]
[TD]283
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.90.001
[/TD]

</tbody>
[/TD]
[TD="align: center"]16127
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD]283
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl70, width: 113"] 14110.71.001
[/TD]

</tbody>
[/TD]
[TD][TABLE="align: center"]
<tbody>[TR]
[TD]16127
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl70, width: 113"] 10080.40.022
[/TD]

</tbody>
[/TD]
[TD]283
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD][TABLE="align: center"]
<tbody>[TR]
[TD]16127
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]10080.40.023
[/TD]

</tbody>
[/TD]
[TD]283
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD][TABLE="align: center"]
<tbody>[TR]
[TD]16127
[/TD]
[/TR]
</tbody>[/TABLE]
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]10080.40.028
[/TD]

</tbody>
[/TD]
[TD]283
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD="align: center"]16128
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]10080.70.301
[/TD]

</tbody>
[/TD]
[TD]317
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD="align: center"]16128
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]10080.70.501
[/TD]

</tbody>
[/TD]
[TD]317
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"] 14110.71.001
[/TD]

</tbody>
[/TD]
[TD="align: center"]16128
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl70, width: 113"] 10080.40.022
[/TD]

</tbody>
[/TD]
[TD]317
[/TD]
[/TR]
[TR]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]14110.71.001
[/TD]

</tbody>
[/TD]
[TD="align: center"]16128
[/TD]
[TD]

<colgroup><col width="113"></colgroup><tbody>
[TD="class: xl69, width: 113"]10080.40.023
[/TD]

</tbody>
[/TD]
[TD]317
[/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
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 [TABLE="width: 64"]
<tbody>[TR]
[TD="width: 64, align: right"]=SUMIFS(D:D,A:A,A4,C:C,C4)

will return the result of 600.


[/TD]
[/TR]
</tbody>[/TABLE]
 
Upvote 0

Forum statistics

Threads
1,223,264
Messages
6,171,081
Members
452,377
Latest member
bradfordsam

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