August 29, 201312 yr I am looking for a custom function that will get values based upon a list of value numbers. Example: Data = a¶b¶c¶d¶e¶f¶g Value Numbers = 3¶5¶6 Result should be = c¶e¶f Or if I can choose my own separator, that would be great. Any help I can get would be greatly appreciated.
August 29, 201312 yr Author Thank you for the reply. That function does not get specific values. It gets every 2nd or 3rd or 4th and so on.
August 29, 201312 yr /* GetValues ( listOfValues ; listOfNumbers ) */ Let([ $i = $i + 1; v = GetValue ( listOfValues ; GetValue ( listOfNumbers ; $i ) ) ]; Case( $i ≤ ValueCount ( listOfNumbers ) ; List ( v ; GetValues ( listOfValues ; listOfNumbers ) ); Let ( $i = "" ; "" ) ) )
August 29, 201312 yr Try something like: GetValues ( listOfValues ; valueNumbers ) = Let ( countValues = ValueCount ( valueNumbers ) ; GetValue ( listOfValues ; GetValue ( valueNumbers ; 1 ) ) & Case ( countValues > 1 ; ¶ & GetValues ( listOfValues ; RightValues ( valueNumbers ; countValues - 1 ) ) ) ) To use your own separator, just substitute it with ¶ when calling the function, then reverse the substitution on the result.
August 29, 201312 yr @Nick What should be the result if: Data = a¶b¶c¶d¶e¶f¶g Value Numbers = 8¶1¶2 ? If it shoud be: a¶b than my CF is OK else If it shoud be: ¶a¶b than Comment's CF is OK
Create an account or sign in to comment