Ok, I'll try.
>> Get the wavesize
>> Get input array a
>> Create output array b where the result will be written
>> Looping for each row in input array
>> w is variable to hold current wave number (as seen on B21:B32) like Wave 1, Wave 2, etc
>> t is variable to hold carried total, for example on D4, the route is 26, so first time t=26
>> after subtracted by wavesize it becomes t=2, after added by D5 (route is 13) it becomes t=15, etc
>> Now on column 2, anytime we get the value of a row is different with the value of row above it,
>> (like Orange vs Blue) we will reset the w to 1 and t to 0
>> It is possible that one data row is splitted to several output rows (like D4), so we must
>> process this inside another loop (Do..Loop)
>> Write output to Excel range
Bookmarks