add cells with the same criteria

fahimip

New Member
Joined
Sep 27, 2006
Messages
35
HI

i need to write code for a list of cells which have the following column headings; NAME and QUANTITY .
what i want is for the code to filter the list so that any quantities for the same name are added together


thank u
 

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.
Create a unique list from your names, using an advanced filter. Then use sumif() with the unique list as the criteria.
 
Upvote 0
Hi Steve

Im a little confused as to what i should use as the range and criteria when im using SumIF

this is the list that i have;

Code Qty
M/A/012 2
M/A/07 4
M/A/12 89
M/B/01 6
M/B/02 1
M/B/04 4
M/B/07 1
M/B/10 3
M/B/12 4
M/B/13 25
M/B/13 1
M/B/17 3
M/B/18 8
M/I/10 2
M/I/13 5
M/I/14 1
M/S/07 14
M/S/18 6
M/S/12 12
M/S/18 2
M/S/20 5
M/S/21 11
 
Upvote 0
i dont know if ive been clear enough, what i want to do is if two cells have the same 'code' then i would like these cells to be merged and their respective quantities to be added together
 
Upvote 0

Forum statistics

Threads
1,213,510
Messages
6,114,044
Members
448,543
Latest member
MartinLarkin

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