Hi, i have a string called ‘selection name’ which has multiple string value separate by linefeed. i have another variable that i want to look for. if the search string is not found, then add in new search string into the ‘selection name’ field.
SelectionName has value like below
Apple
Orange
Banana
i can’t use instr just in case the search word i am looking for was part of a word in SelectionName. say my search word is App. Using instr, i will found the word ‘App’ but i want to add to the bottom.
currently i am splitting the SelectionName into an array and then looping through the array, compare the search word and if not found, add into end of SelectionName. To add the string, i use ‘vSel=vSel + cr +searchword’. Is there a faster way of doing this join?