Search and Replace Entire Cell Content

J

JerryG

I want to search for text within a cell, and if that text is found anywhere
within that cell, replace the entire cell with a given text string
 
D

DILipandey

Hi Jerry,
You can use SUBSTITUTE or REPLACE function.
for Example: if you want to search and replace 1 in the following value
entered in cell A1:-
abc1defghij1klmno1pqrstuvw1xyz
Use formulae =SUBSTITUTE(A1,"1","")
Please let me know if this helps. Thanks
--
Dilip Kumar Pandey
MBA, BCA, B.Com(Hons.)
(e-mail address removed)
(e-mail address removed)
New Delhi, India
 
S

Stefi

Enter this formula in an empty helper column
=IF(ISERROR(FIND("texttosearchfor",A2)),A2,"givenstring")
and fill it down as necessary. You can Copy-PasteSpecial/Value the result
back to the original cells.

Regards,
Stefi


„JerryG†ezt írta:
 
R

Rick Rothstein \(MVP - VB\)

I'm guessing you want to do that to the cell's content itself. Try this.
Select all the cells you want to do this to and then click Edit/Replace in
Excel's menu bar. Assuming for this example that the text you want to find
is "find me" (without the quote marks). Put this in the "Find what" field...

*find me*

then put the replacement text in the "Replace with" field. The key to
replacing the entire contents using Replace is the asterisks on both sides
of the text you are search for.

Rick
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top