johnbird1988
Board Regular
- Joined
- Oct 6, 2009
- Messages
- 199
Hello
I would like some help in rotating some numbers within two column.
My data looks like the below.
A B
1 1 2
2 3 4
3 5 6
For this example I have used 1 to 6. However it will always start with 1 but the maximum number will be different but always even. What I would like to do is create a loop that will rotate the numbers clockwise. So by running the code it will look like this
A B
1 3 1
2 5 2
3 6 4
And if I was to run the code again I would get:
A B
1 5 3
2 6 1
3 4 2
And so on.
I am a bit stuck on how I can achieve this given the numbers will change each time
Please any help will be appreciative.
Thank you,
John
I would like some help in rotating some numbers within two column.
My data looks like the below.
A B
1 1 2
2 3 4
3 5 6
For this example I have used 1 to 6. However it will always start with 1 but the maximum number will be different but always even. What I would like to do is create a loop that will rotate the numbers clockwise. So by running the code it will look like this
A B
1 3 1
2 5 2
3 6 4
And if I was to run the code again I would get:
A B
1 5 3
2 6 1
3 4 2
And so on.
I am a bit stuck on how I can achieve this given the numbers will change each time
Please any help will be appreciative.
Thank you,
John