Author Topic: Using dimension in formulas  (Read 4361 times)

0 Members and 1 Guest are viewing this topic.

Panther

  • Newbie
  • *
  • Posts: 3
Using dimension in formulas
« on: November 18, 2008, 04:36:23 AM »
Hello, I have a problem that I'm struggling with.

I have a shape that is going to be in any one of 28 known positions.  I want to take the PinY position, rationalise it so that each vertical increase of 20mm is an increment of 1, and use that in an INDEX() funtion to return a text string from a list of strings.

e.g. 1st position is y=230mm, 2nd position is y=250mm, and so on.  To rationalise this I've used: position=IF((PinY-230 mm)=0,1,((PinY-230 mm)/20)+1 mm) (the IF statement is required to avoid dividing 0 by 20).  I would then like to use this within: INDEX(position,"a;b;c;d;e") where the string has 28 possible values.

When I try the above, the result is ALWAYS the first string in the list, regardless of position!  I've tried an alternative approach by using the MID() function and having the string without seperators, but the result is the same - ALWAYS the first letter.

Help!!!  (My only thought is that the dimension is somehow preventing the formulas from recognising it as a number).

P.S. I have also posted this in the "Shapesheets & Smart Shapes" forum as I am not sure which it should live in.
« Last Edit: November 18, 2008, 08:47:29 AM by Panther »