Challenging formula, please help!

J

Jen

Hi,
Would anyone like to take on a challenge?

I have numbers that represent arm choices on a maze that
has 8arms radiating out from a central hub like spokes of
a wheel. The arms are labelled 1,2,3,4,5,6,7 and 8. I
need to work out what strategy was used to solve the maze
based on the pattern of arms chosen. In order to do this,
each arm choice made needs to have a value that is
defined in relation to the previously chosen arm. So for
each arm chosen, the four clockwise arms are labelled
+1,+2,+3 and +4; while the 3 counter-clockwise arms are
labelled -1, -2, -3. If the second arm choice is the same
as the first, it should be labelled 0. I need a formula
that will convert the arm numbers to these values.

For example in solving the maze the following arm
selections may be made 6,1,5,8,2,4,3,7.
Each individual number is in a new cell in excel.
Since the formula needs to be defined by the previous
cell's value, in the above example since the first
cell=6, the second cell (currently containing the number
1) should be +3. For the second cell=1, the next choice
(which =5) should be +4. and so on.

I need a formula that will re-calculate these arm values
into the new codes into corresponding new cells in Excel.

I would greatly appreciate any help!

As an aid to a solution, here is the matrix of arm
choices and corresponding new values.


Next Arm New Values
1st +1 +2 +3 +4 -3 -2 -1 0
Arm
1 2 3 4 5 6 7 8 1
2 3 4 5 6 7 8 1 2
3 4 5 6 7 8 1 2 3
4 5 6 7 8 1 2 3 4
5 6 7 8 1 2 3 4 5
6 7 8 1 2 3 4 5 6
7 8 1 2 3 4 5 6 7
8 1 2 3 4 5 6 7 8

Thankyou in advance, and kindest regards,

Jen
 
H

Harlan Grove

...
...
I have numbers that represent arm choices on a maze that
has 8arms radiating out from a central hub like spokes of
a wheel. The arms are labelled 1,2,3,4,5,6,7 and 8. I
need to work out what strategy was used to solve the maze
based on the pattern of arms chosen. In order to do this,
each arm choice made needs to have a value that is
defined in relation to the previously chosen arm. So for
each arm chosen, the four clockwise arms are labelled
+1,+2,+3 and +4; while the 3 counter-clockwise arms are
labelled -1, -2, -3. If the second arm choice is the same
as the first, it should be labelled 0. I need a formula
that will convert the arm numbers to these values.
...

If X were the initial arm selected and Y were the subsequent arm selected, then
you could try =MOD(Y-X,8)-8*(MOD(Y-X,8)>4) .
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top