Home > Mobile >  Excel: How to extract text strings from a formula?
Excel: How to extract text strings from a formula?

Time:08-16

I want to split text strings from the below formula in a cell that generates a numeric value.

=RTD($A$1;;"aaa@bbb//ccc////ddd")

Using the mid & search funktion to split certain parts such as =MID(A23; SEARCH("////";A23) 4; 3) only works if text is stored in cells, but not on a formula in the cell.

How to extract strings from a formula?

CodePudding user response:

If you don't want to use the formulatext function, you can use the find and replace. Replace for exampel the "=" with "@=" Then you can extract what ever you want with the mid function. When you are done replace "@=" with "="

CodePudding user response:

As per the comment section you can use FORMULATEXT(). If you have TEXTAFTER() available, try:

=LEFT(TEXTAFTER(FORMULATEXT(A1),"////"),3)
  • Related