Find/Replace

E

ExcelMonkey

Not sure if this is the right forum for this. I want to
do a Find/Replace in Excel. I want to Replace everything
after the first asterisk in each cell.

For Example:
170*(A34-A33)

would then look like
170

How do you search on * and everything that comes after it?

Thanks
 
B

Bernie Deitrick

ExcelMonkey,

Use Edit |Replace... For "Find what" use

~**

and leave "Replace with" blank.

HTH,
Bernie
MS Excel MVP
 
E

ExcelMonkey

Thanks Bernie. Can you tell me of all the ways to do
searches using Find/Replace (i.e. what type of wild cards
can be used. I really do not understand the syntax and
have to say that I cannot use to its full potential.

For example is possible to do the following:

Find/Replace everything up to X
Find/Replace everything after X
Find/Replace everything up to X and everything after Y
Find/Replade everytning up to first occurence of X and
first occurence of Y
Find multiple occurences of X

Thanks
 
B

Bernie Deitrick

Find/Replace everything up to X
Find *X
Replace X
Find/Replace everything after X
Find X*
Replace X
Find/Replace everything up to X and everything after Y
Do a two part Find/Replace, as above
Find/Replade everytning up to first occurence of X and
first occurence of Y
This one would require VBA.
Find multiple occurences of X
And replace? Then simply Find X and Replace.

Bernie
 
B

Bernie Deitrick

Also, for the wildcard characters, from Help,

Wildcard characters
The following wildcard characters can be used as comparison criteria for
filters, and when searching and replacing content.
UseTo find
? (question mark) Any single character
For example, sm?th finds "smith" and "smyth"

* (asterisk) Any number of characters
For example, *east finds "Northeast" and "Southeast"

~ (tilde) followed by ?, *, or ~ A question mark, asterisk, or
tilde
For example, fy91~? finds "fy91?"


HTH,
Bernie
MS Excel MVP
 
E

ExcelMonkey

Thanks Bernie!!!!! Much appreciated.



-----Original Message-----
Find *X
Replace X

Find X*
Replace X

Do a two part Find/Replace, as above

This one would require VBA.

And replace? Then simply Find X and Replace.

Bernie


.
 

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