Got it to work and could solve both caches:

* N62 11.423 E008 30.934
* N62 11.529 E008 30.476

“Jigidon’t”‘s solution still works. In my case, the comparison was the other way round. Instead of “W lt R” I had “W gt R”. Therefore, I had to turn the equation the other way round. Instead of “W = R” it had to be “R = W”. In order to be sure, just check which variable is increased within the for line. Increment is done by “++”. So if you read “++W”, the equation must be “W = R”. That way you are setting the counter to the total number of parts.