I have a range with two columns (code and quantity) and I need to store unique values (codes) in an array and add their quantity if the code appears more times in the range.
For example, if code 3552 has a value of 3000 in row 1 of the range and a value of 5000 in row 50 of the range, I need code 3552 and value 8000 to appear only once in the array.
Can you give me a hand?
Thank you very much.
This should work if your purpose is to put the values in an array, you could play directly with the dictionary, but you should learn how to use them. In that case, obvious from the dimensioning of the
arrFinal
I learned how to use dictionaries with this guide .