in reply to Re^2: adding values of element
in thread adding values of element

Hi, johngg beat me to it, but, I would have said, you could just rename %uniq to %sum and do "increasing/decreasing" inside the loop

You got tricked by your choice of variable name, see Re^4: adding values of element, so I just wanted to emphasize that for you