InsertCol(x+1); count = 1; for(y=Bottom; y>=2; y--){ if([x,y] == [x,y-1]){ count++; DeleteRow(y); }else{ [x+1,y] = count; count = 1; } } [x+1,1] = count;