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
 

Some videos you may like

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.

SteveO59L

Well-known Member
Joined
Apr 21, 2004
Messages
7,896
Create a unique list from your names, using an advanced filter. Then use sumif() with the unique list as the criteria.
 

fahimip

New Member
Joined
Sep 27, 2006
Messages
35
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
 

fahimip

New Member
Joined
Sep 27, 2006
Messages
35
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
 

Watch MrExcel Video

Forum statistics

Threads
1,113,919
Messages
5,545,027
Members
410,647
Latest member
bernardazar
Top