dalstar,
I thought it was an interesting formula too, so I spent some time to attempt
to figure it out as well. Ron or others, please correct me if I am wrong.
Let's start in the inner portion and work our way outwards.
FIND("#",A1)+1
Find's syntax is as follows:
Find(Find_text, Within_text, Start_num)
In our example, we are looking for the # sign in A1. (We don't use the
"Start_num" as it is not required.) That is the 14th character. Then 1 is
added to arrive at 15.
Incidentally, in the formula bar you can highlight portions of a formula and
hit the F9 key to see the portion evaluated. It is helpful when trying to
debug or understand.
Now the replace function looks like this:
Replace(Old_text, Start_num, Num_chars, New_text)
So our prior expression of
=REPLACE(A1,FIND("#",A1)+1,255,"")
can be written as
=REPLACE(A1,15,255,"")
In words, that says to replace characters in cell A1, starting at the 15th
character, continuing for 255 characters, and you want to replace the old
characters with "" (blank).
I am not sure why 255 was chosen, perhaps the max number of characters in a
string in a cell? I am not sure. But that is my interpretation of the
formula.
Any and all corrections welcomed.
Regards,
Kevin