July 23, 201510 yr Hi Here is the function which will give the value position in a list. ValueCount ( Left ( $ItemList ;Position ( "¶"& $ItemList & "¶" ; "¶" & $SearchString & "¶" ; 1 ; 1 ) + Length ( $SearchString )) ) Example,$ItemList = "1¶2¶14¶5¶222¶12¶22¶42¶11¶23¶44" $SearchString = "22" Result = 7
July 23, 201510 yr This part is unnecessary; + Length ( $SearchString ) And so are quotes around a single ¶. Edited July 23, 201510 yr by comment
July 23, 201510 yr Here is the function which will give the value position in a list.ValueCount ( Left ( $ItemList ;Position ( "¶"& $ItemList & "¶" ; "¶" & $SearchString & "¶" ; 1 ; 1 ) + Length ( $SearchString )) ) Present the calculation with generic argument names rather than $variables and it becomes a handy Custom Function: ItemIndexPositionInList ( theItem ; theList ) = ValueCount ( Left ( theList ; Position ( ¶ & theList & ¶ ; ¶ & theItem & ¶ ; 1 ; 1 ) ) )
July 23, 201510 yr Speaking of Custom Functions, will this one do? ListPosition ( ListValues ; SearchValue )
Create an account or sign in to comment