The only caution is that the text in A1 must be less than 100 characters (that is what the 99 establishes). If your text is longer, then you would need to change the three 99's in the formula to a number equal to, or larger than, the maximum number of characters the text in A1 can have (change the 98 to one less than that number).
It turned out that this alternative version that takes the length of the string into consideration is slightly more efficient over 1000 rows of sample data:
Code:=TRIM(LEFT(RIGHT(SUBSTITUTE(delimiter&text,delimiter,REPT(" ",LEN(text))),fieldnumber*LEN(text)),LEN(text)))
So my advices would be to use this version, that not only is guaranteed to work with your data under greater string lengths, but is also likely to save Excel some effort. Not that you'll notice it: we are talking hundredths of a second over 1000 rows of sample data.




Reply With Quote
Bookmarks