Hi T2YUKI,
T2YUKI wrote:
Hi Jacques,
Your formula is great. I was astonished at finding that it works perfectly. But what is the mysterious string of "|"? it seems that the formula: =SEARCH("|",SUBSTITUTE(B2," ","|",4),1) returns the position of the 4th space in a string in B2 cell. Why and how does it work?
It would be easier if there was an occurrence option with the SEARCH function like the SUBSTITUTE function
So, I use SUBSTITUTE to replace the 4th space by an weird string (to be sure that these three consecutive characters do not exist in cell's value) --> "|"
After, the search function find these characters "|" and return the position, RIGHT return all characters after these character |
I use the same function to get the characters after the 5th space.
The =SUBSTITUTE, use the string in the result of the second RIGHT function to remove it in the string of the result of the first RIGHT function