Using VLOOKUPs and calculating total.

Lmaonade

Board Regular
Joined
Jan 5, 2018
Messages
52
Hi guys,

I'm not great with these Vlookups, how do I set a vlookup to add up any matches?

For example my data table has:

[TABLE="width: 500"]
<tbody>[TR]
[TD][/TD]
[TD]A[/TD]
[TD]B[/TD]
[/TR]
[TR]
[TD]1[/TD]
[TD]10001[/TD]
[TD]846[/TD]
[/TR]
[TR]
[TD]2[/TD]
[TD]10001[/TD]
[TD]454[/TD]
[/TR]
[TR]
[TD]3[/TD]
[TD]10002[/TD]
[TD]662[/TD]
[/TR]
[TR]
[TD]4[/TD]
[TD]10002[/TD]
[TD]277[/TD]
[/TR]
[TR]
[TD]5[/TD]
[TD]10002[/TD]
[TD]548[/TD]
[/TR]
[TR]
[TD]6[/TD]
[TD]10003[/TD]
[TD]292[/TD]
[/TR]
[TR]
[TD]7[/TD]
[TD]10004[/TD]
[TD]367[/TD]
[/TR]
[TR]
[TD]8[/TD]
[TD]10004[/TD]
[TD]269[/TD]
[/TR]
</tbody>[/TABLE]


So when I do my Vlookup by the reference numbers (10001, 10002 etc) I want the result to give me for each 10001 = 1300, 10002 = 1487, 10003 = 292, 10004 = 636

How would I set this?

Thanks,
Andy
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
No silly at all, SUMIF is exactly the way to go from the sound if it;

Code:
=SUMIF(A:A,10001,B:B)

OR

Code:
=SUMIF(A:A,A1,B:B)

If you wanted to use cell references to make it more dynamic
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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