Quote Originally Posted by BigBas View Post
Yikes, that is a HUGE formula. Essentially, I used 2 quotation marks to indicate that it was not the end of the formula statement (consider that the formula is opened with a quotation mark, and the second one would usually close it formula.

Try this and report back:

Sub jdlkfsldk()
    Range("A1").Value = "=IF(LEN(D23)-LEN(SUBSTITUTE(D23,""["",""""))>1,TRIM(MID(LEFT(D23,FIND(""|"",SUBSTITUTE(D23,""["",""|"",2))-1),FIND("">"",D23)+1,255)),TRIM(MID(RIGHT(D23,FIND(""|"",SUBSTITUTE(D23,""<"",""|"",1))+255),FIND("">"",D23)+1,255)))"


End Sub
Keep in mind, this is a very long formula. Have you considered if there is a VBA alternative for whatever you are trying to extract?
Oh my God!
It works!
But please tell me, how did you know where to put the "? I dont get it.
You said you just added two " ?
Only two?

I have not considered a VBA alternative as I created this formula on Excel as I found it easier (given the complexity of it).

thanks a lot!