Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel - Replacing Text String With Other Text 1

Status
Not open for further replies.

beanxx

Technical User
Jul 9, 2002
61
GB
If cell A1 = "Answer_A" or "Answer_B" how do I get cell B1 to return "Answer A" or "Answer B", with the underscores removed. I guess I need to use some form of IF statement, but I'm not sure how to implement this. Can anyone help?

Justin
 
=SUBSTITUTE(A1,"_"," ")
where your text is in A1 will do the trick

Rgds, Geoff
Quantum materiae materietur marmota monax si marmota monax materiam possit materiari?
Want the best answers to your questions ? faq222-2244
 
Why don't you seperate out the text that you want using the LEFT and RIGHT functions. You can then use the CONCATERNATE formula to add the info back together including a space.

Or do a find and replace on the _ character with a space character.

Regards,

Ian
 
Geoff, Works a treat thanks very much and well worthy of a star!

Thanks a lot,

Justin
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top