ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Find and replace a value within a formula (https://www.excelbanter.com/excel-discussion-misc-queries/244492-find-replace-value-within-formula.html)

FLYNNE

Find and replace a value within a formula
 
In a worksheet there at least a 1000 cells containing the formula = Cell
reference*6.23 where cell reference is A1 , A2 , A3 etc.

I wish to change the value 6.23 in these formulae to 6.30 by using Find and
Replace.

If Find what = *6.23 and Replace with = *6.30 the formula in each cell
disappears and the contents of each cell becomes *6.30.

I of course could use

Find what = 6.23 and Replace with = 6.30 - this works but unfortunately
changes any cell value containing 6.23 in the worksheet which I wish to avoid.

Any suggestions please ?

regards

Flynne
--
FLYNNE

Dave Peterson

Find and replace a value within a formula
 
The asterisk is a wildcard meaning any number of characters:

Try selecting the range to fix
Edit|replace
what: ~*6.23
with: *6.3
replace all

If you want to replace an asterisk character, use ~* in the from string.
If you want to replace a question mark, use ~? in the from string.
If you want to replace a tilde (~), use ~~ in the from string.


FLYNNE wrote:

In a worksheet there at least a 1000 cells containing the formula = Cell
reference*6.23 where cell reference is A1 , A2 , A3 etc.

I wish to change the value 6.23 in these formulae to 6.30 by using Find and
Replace.

If Find what = *6.23 and Replace with = *6.30 the formula in each cell
disappears and the contents of each cell becomes *6.30.

I of course could use

Find what = 6.23 and Replace with = 6.30 - this works but unfortunately
changes any cell value containing 6.23 in the worksheet which I wish to avoid.

Any suggestions please ?

regards

Flynne
--
FLYNNE


--

Dave Peterson

FLYNNE

Find and replace a value within a formula
 
Thanks Dave

That worked perfectly - I had forgotten that * and ? acted as wild
characters in searches.

Thanks again

--
FLYNNE


"Dave Peterson" wrote:

The asterisk is a wildcard meaning any number of characters:

Try selecting the range to fix
Edit|replace
what: ~*6.23
with: *6.3
replace all

If you want to replace an asterisk character, use ~* in the from string.
If you want to replace a question mark, use ~? in the from string.
If you want to replace a tilde (~), use ~~ in the from string.


FLYNNE wrote:

In a worksheet there at least a 1000 cells containing the formula = Cell
reference*6.23 where cell reference is A1 , A2 , A3 etc.

I wish to change the value 6.23 in these formulae to 6.30 by using Find and
Replace.

If Find what = *6.23 and Replace with = *6.30 the formula in each cell
disappears and the contents of each cell becomes *6.30.

I of course could use

Find what = 6.23 and Replace with = 6.30 - this works but unfortunately
changes any cell value containing 6.23 in the worksheet which I wish to avoid.

Any suggestions please ?

regards

Flynne
--
FLYNNE


--

Dave Peterson



All times are GMT +1. The time now is 04:54 PM.

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