D
David Van Heuverswyn
Hello,
I have a 2 dimensional array with 3 colums, consisting of a product column,
a number column and a column for the amount of the product used.
Like this:
Calcium 123 50(g)
Potassium 245 10
Zinc 360 15
Calcium 123 25
What I want to do is loop through the array and make a new array, but with
all the Calcium with the same number (123) only mentioned ONCE and with the
amounts used added, like this.
Calcium 123 75
Potassium 245 10
Zinc 360 15
So I want to put in the new array:
* all unique products and
* the added amounts of all the products that appear more than once and have
the same number.
I'm quite a VBA newbie and already tried several times to find a solution,
but without any luck.
Any help would be great.
Thanks in advance,
David
I have a 2 dimensional array with 3 colums, consisting of a product column,
a number column and a column for the amount of the product used.
Like this:
Calcium 123 50(g)
Potassium 245 10
Zinc 360 15
Calcium 123 25
What I want to do is loop through the array and make a new array, but with
all the Calcium with the same number (123) only mentioned ONCE and with the
amounts used added, like this.
Calcium 123 75
Potassium 245 10
Zinc 360 15
So I want to put in the new array:
* all unique products and
* the added amounts of all the products that appear more than once and have
the same number.
I'm quite a VBA newbie and already tried several times to find a solution,
but without any luck.
Any help would be great.
Thanks in advance,
David