This is a very handy formula: =TRIM(MID(SUBSTITUTE(A1,",",REPT(" ",99)),7*99-98,99)). It is much shorter and has fewer functions than some of the ones that I have used. I have been trying to understand it and the part that evades my understanding is the:
7*99-98
I see that the multiplying of "number of the field you want to extract" * "the max number of characters" (7*99) gets you into the "sea of spaces" past the "field you want to extract" (seventh field). And I understand that the subtraction gets you back to the "sea of spaces" before the "field you want to extract", but why does it need the minus 1 (98 = 99-1)? What is the situation that would lead to trouble if you did not have the minus 1?
Thanks in advance!




Reply With Quote
Bookmarks