calculate next line numbers

Posted by osomanden on Stack Overflow See other posts from Stack Overflow or by osomanden
Published on 2013-10-31T15:51:41Z Indexed on 2013/10/31 15:53 UTC
Read the original article Hit count: 238

Weird question I guess.. But I am not very math wiz - soo here goes..

I am trying to create a patterne (or variable patterns based on selection) based on x and y numbers (2 rows and 4 columns) and the direction of the counting of x numbers

like:

1-2-3-4 5-6-7-8

That one is easy, when number of x-columns is reached, next line and continue x count.

But with eg. this one (still 2 rows and 4 columns):

1-2-3-4 8-7-6-5

upsie.. what if it is eg. 3++ rows and still 4 columns?

1-2-3-4 8-7-6-5 9-10-11-12

what would be the formula for this - or other possible variations (teaser for variations):

9-10-11-12 8-7-6-5 1-2-3-4 or reversed

© Stack Overflow or respective owner

Related posts about for-loop

Related posts about calculated-columns