hello, can anyone help me perform the following calculation in excel please?
I have a long list of items and their quantities, example:
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64, align: right"]101001[/TD]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101001[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101001[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]101001[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101002[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101002[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101003[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101004[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101005[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
now i would like to merge all the rows with the same value in column A and add up the corresponding values in column B to return the following:
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64, align: right"]101001[/TD]
[TD="width: 64, align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]101002[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]101003[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101004[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101005[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]13[/TD]
[/TR]
</tbody>[/TABLE]
I am guessing I have to run a macro, but I have no idea how to do that... any help would be much appreciated!
thanks, chez
I have a long list of items and their quantities, example:
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64, align: right"]101001[/TD]
[TD="width: 64, align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101001[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101001[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]101001[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101002[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101002[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101003[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101004[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101005[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]5[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]2[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]1[/TD]
[/TR]
</tbody>[/TABLE]
now i would like to merge all the rows with the same value in column A and add up the corresponding values in column B to return the following:
[TABLE="width: 128"]
<tbody>[TR]
[TD="width: 64, align: right"]101001[/TD]
[TD="width: 64, align: right"]10[/TD]
[/TR]
[TR]
[TD="align: right"]101002[/TD]
[TD="align: right"]7[/TD]
[/TR]
[TR]
[TD="align: right"]101003[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101004[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101005[/TD]
[TD="align: right"]6[/TD]
[/TR]
[TR]
[TD="align: right"]101050[/TD]
[TD="align: right"]13[/TD]
[/TR]
</tbody>[/TABLE]
I am guessing I have to run a macro, but I have no idea how to do that... any help would be much appreciated!
thanks, chez