ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Find/Replace (https://www.excelbanter.com/excel-worksheet-functions/12100-find-replace.html)

ExcelMonkey

Find/Replace
 
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

Bernie Deitrick

ExcelMonkey,

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

~**

and leave "Replace with" blank.

HTH,
Bernie
MS Excel MVP

"ExcelMonkey" wrote in message
...
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




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



-----Original Message-----
ExcelMonkey,

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

~**

and leave "Replace with" blank.

HTH,
Bernie
MS Excel MVP

"ExcelMonkey" wrote

in message
...
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



.


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



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

"ExcelMonkey" wrote in message
...
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



-----Original Message-----
ExcelMonkey,

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

~**

and leave "Replace with" blank.

HTH,
Bernie
MS Excel MVP

"ExcelMonkey" wrote

in message
...
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



.




ExcelMonkey

Thanks Bernie!!!!! Much appreciated.




-----Original Message-----
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


.



All times are GMT +1. The time now is 02:28 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com