Extracting text from a formula?

  • Thread starter Thread starter Richard m
  • Start date Start date
R

Richard m

I have the following in a cell:

=-This is test

the above was imported from another program and I want to extract the
text part so I have *This is Text* as text.

I have tried functions and code. The last code is and it did not
work.


Code:
 
Richard,

From your text I understand that your cell contains both the =ans the - sign
as well as the text.

If so (assume your cell is G2) this formula should work for you :

=RIGHT(G2,LEN(G2)-2)

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Richard,

The #NAME indicates that there actually is a formula ( -This is text)
which Excel doesn't recognize)

To solve it : Select the cells ; Edit / Find / in the Find what put =-
and in the Replace box put nothing ( thus empty) ; make sure that the Match
entire cell contents is unchecked and press the button Replace.

This removes =- from your "formula" and leaves the text in the cell.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
YW Richard. it's always nice to hear things have been solved.
As far as complicating things is concerned, it happens me as well sometimes.
So dont't worry.

--
Regards,
Auk Ales

* Please reply to this newsgroup only *
* I will not react on unsolicited e-mails *
 
Back
Top