VLookup - Duplicate Lookup Values

BobbM424

New Member
Joined
Aug 2, 2007
Messages
14
I am trying to use a vlookup formula to pull information from one sheet to another. The problem is that my ID column has many duplicate ID's but each ID has a different quantity and vlookup always pulls the quantity from the first ID in the array. For example:

ID Original Vlookup
Lugo 1 1
Pedroia 2 2
Ortiz 3 3
Ramirez 4 4
Drew 5 5
Youkilis 6 6
Lowell 7 7
Varitek 8 8
Crisp 9 9
Lugo 4 1
Pedroia 5 2
Ortiz 6 3
Ramirez 7 4
Drew 8 5
Youkilis 95 6
Lowell 3 7
Varitek 2 8
Crisp 1 9

Total 176 90


Is there any way I can fix this so that it uses the correct quantity for each ID and not just the first quantity it encounters?

Thanks a lot for your help.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce

Jonmo1

MrExcel MVP
Joined
Oct 12, 2006
Messages
44,061
How do you determine which one is the correct quantity to return? Or do you want to ADD them All together?

If you want to add them all together, use sumif.

=vlookup("Lugo",A:B,2,FALSE) - will return 1
=sumif(A:A,"Lugo",B:B) - will return 5
 

BobbM424

New Member
Joined
Aug 2, 2007
Messages
14
I am trying to sum the 2nd column. the 3rd column is just what vlookup gives me, basically I need a function that will cause the 3rd column to match the second column.
 

Forum statistics

Threads
1,181,103
Messages
5,928,077
Members
436,587
Latest member
Slicesofquince

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