Spreadsheet: 851553d1701770693-how-to-write-a-macro-excel-2010-example
Sheet: LONG EXAMPLE for 128 lines

 |  |  |  | LEFT |  | RIGHT |  | colour order |  | rule for colour order is simpl:
line | N |  |  | 1st | 2nd | 1st | 2nd
1 | 258 | 129 | 33540 | 264967 | 267289 | 265225 | 267030 | 1 | O | begin is  first 2 lines, each different colour, orange (O) and white (W): O-W
2 | 260 | 130 | 34060 | 269101 | 271441 | 269361 | 271180 | 2 | W
3 | 262 | 131 | 34584 | 273267 | 275625 | 273529 | 275362 |  | W | then has to be oposite for line  3 and 4, so white (W) and orange (O), now we have O-W-W-O
4 | 264 | 132 | 35112 | 277465 | 279841 | 277729 | 279576 | 1 | O
5 | 266 | 133 | 35644 | 281695 | 284089 | 281961 | 283822 | 1 | W | now we have 4 lines, and for next 4 lines is oposite, so: W-O-O-W
6 | 268 | 134 | 36180 | 285957 | 288369 | 286225 | 288100 | 2 | O
7 | 270 | 135 | 36720 | 290251 | 292681 | 290521 | 292410 |  | O | now we have 8 lines: O-W-W-O-W-O-O-W, and for next 8 lines is oposite, so:
8 | 272 | 136 | 37264 | 294577 | 297025 | 294849 | 296752 | 2 | W
9 | 274 | 137 | 37812 | 298935 | 301401 | 299209 | 301126 |  | W | W-O-O-W-O-W-W-O, now we have 16 lines: O-W-W-O-W-O-O-W-W-O-O-W-O-W-W-O
10 | 276 | 138 | 38364 | 303325 | 305809 | 303601 | 305532 | 2 | O
11 | 278 | 139 | 38920 | 307747 | 310249 | 308025 | 309970 |  | O | and so on
12 | 280 | 140 | 39480 | 312201 | 314721 | 312481 | 314440 | 1 | W
13 | 282 | 141 | 40044 | 316687 | 319225 | 316969 | 318942 | 1 | O | after doubling every time oposite colour then privious seria
14 | 284 | 142 | 40612 | 321205 | 323761 | 321489 | 323476 | 2 | W
15 | 286 | 143 | 41184 | 325755 | 328329 | 326041 | 328042 |  | W
16 | 288 | 144 | 41760 | 330337 | 332929 | 330625 | 332640 | 1 | O
17 | 290 | 145 | 42340 | 334951 | 337561 | 335241 | 337270 | 1
18 | 292 | 146 | 42924 | 339597 | 342225 | 339889 | 341932 | 2
19 | 294 | 147 | 43512 | 344275 | 346921 | 344569 | 346626
20 | 296 | 148 | 44104 | 348985 | 351649 | 349281 | 351352 | 1
21 | 298 | 149 | 44700 | 353727 | 356409 | 354025 | 356110 | 1
22 | 300 | 150 | 45300 | 358501 | 361201 | 358801 | 360900 | 2
23 | 302 | 151 | 45904 | 363307 | 366025 | 363609 | 365722
24 | 304 | 152 | 46512 | 368145 | 370881 | 368449 | 370576 | 2
25 | 306 | 153 | 47124 | 373015 | 375769 | 373321 | 375462
26 | 308 | 154 | 47740 | 377917 | 380689 | 378225 | 380380 | 2
27 | 310 | 155 | 48360 | 382851 | 385641 | 383161 | 385330
28 | 312 | 156 | 48984 | 387817 | 390625 | 388129 | 390312 | 1
29 | 314 | 157 | 49612 | 392815 | 395641 | 393129 | 395326 | 1
30 | 316 | 158 | 50244 | 397845 | 400689 | 398161 | 400372 | 2
31 | 318 | 159 | 50880 | 402907 | 405769 | 403225 | 405450
32 | 320 | 160 | 51520 | 408001 | 410881 | 408321 | 410560 | 2
33 | 322 | 161 | 52164 | 413127 | 416025 | 413449 | 415702
34 | 324 | 162 | 52812 | 418285 | 421201 | 418609 | 420876 | 2
35 | 326 | 163 | 53464 | 423475 | 426409 | 423801 | 426082
36 | 328 | 164 | 54120 | 428697 | 431649 | 429025 | 431320 | 1
37 | 330 | 165 | 54780 | 433951 | 436921 | 434281 | 436590 | 1
38 | 332 | 166 | 55444 | 439237 | 442225 | 439569 | 441892 | 2
39 | 334 | 167 | 56112 | 444555 | 447561 | 444889 | 447226
40 | 336 | 168 | 56784 | 449905 | 452929 | 450241 | 452592 | 2
41 | 338 | 169 | 57460 | 455287 | 458329 | 455625 | 457990
42 | 340 | 170 | 58140 | 460701 | 463761 | 461041 | 463420 | 2
43 | 342 | 171 | 58824 | 466147 | 469225 | 466489 | 468882
44 | 344 | 172 | 59512 | 471625 | 474721 | 471969 | 474376 | 1
45 | 346 | 173 | 60204 | 477135 | 480249 | 477481 | 479902 | 1
46 | 348 | 174 | 60900 | 482677 | 485809 | 483025 | 485460 | 2
47 | 350 | 175 | 61600 | 488251 | 491401 | 488601 | 491050
48 | 352 | 176 | 62304 | 493857 | 497025 | 494209 | 496672 | 1
49 | 354 | 177 | 63012 | 499495 | 502681 | 499849 | 502326
50 | 356 | 178 | 63724 | 505165 | 508369 | 505521 | 508012 | 2
51 | 358 | 179 | 64440 | 510867 | 514089 | 511225 | 513730
52 | 360 | 180 | 65160 | 516601 | 519841 | 516961 | 519480 | 1
53 | 362 | 181 | 65884 | 522367 | 525625 | 522729 | 525262 | 1
54 | 364 | 182 | 66612 | 528165 | 531441 | 528529 | 531076 | 2
55 | 366 | 183 | 67344 | 533995 | 537289 | 534361 | 536922
56 | 368 | 184 | 68080 | 539857 | 543169 | 540225 | 542800 | 2
57 | 370 | 185 | 68820 | 545751 | 549081 | 546121 | 548710
58 | 372 | 186 | 69564 | 551677 | 555025 | 552049 | 554652 | 2
59 | 374 | 187 | 70312 | 557635 | 561001 | 558009 | 560626
60 | 376 | 188 | 71064 | 563625 | 567009 | 564001 | 566632 | 1
61 | 378 | 189 | 71820 | 569647 | 573049 | 570025 | 572670 | 1
62 | 380 | 190 | 72580 | 575701 | 579121 | 576081 | 578740 | 2
63 | 382 | 191 | 73344 | 581787 | 585225 | 582169 | 584842
64 | 384 | 192 | 74112 | 587905 | 591361 | 588289 | 590976 | 1
 |  |  |  | RESULT HAS TO BE written down there:
 |  |  |  | for ORANGE coloured lines |  | for WHITE coloured lines
 |  |  |  | LEFT | RIGHT | LEFT | RIGHT
 |  |  |  | for each line …. as in short example where is just 1 entering LINE
 |  |  |  | Result of every next line continue where previous ends.