ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How to replace a formula string with * in the leading position? (https://www.excelbanter.com/excel-worksheet-functions/233524-how-replace-formula-string-%2A-leading-position.html)

Seaq

How to replace a formula string with * in the leading position?
 
It's convenient to use Edit -- Replace tool to change part of a formula
string with repeated characters, but strings that starting leading by the
asterisk mark (*) seem to be an exception, for instance, if your want to
replace a selected area with something like b7*sum(....) to b7/sum(...), you
input find "*sum(...)" replace by "/sum(...)", all you can get is "/sum(...)"

Maybe (*) is reserved by Excel, but are there ways to solve this problem?

T. Valko

How to replace a formula string with * in the leading position?
 
Try it like this:

~*sum(...)

In EditReplace Excel thinks the asterisk is a wildcard. You need to tell it
that the asterisk is the literal asterisk character. You do that by
preceding the asterisk or any other wildcard like the question mark ? with
the tilde character ~.

--
Biff
Microsoft Excel MVP


"Seaq" wrote in message
...
It's convenient to use Edit -- Replace tool to change part of a formula
string with repeated characters, but strings that starting leading by the
asterisk mark (*) seem to be an exception, for instance, if your want to
replace a selected area with something like b7*sum(....) to b7/sum(...),
you
input find "*sum(...)" replace by "/sum(...)", all you can get is
"/sum(...)"

Maybe (*) is reserved by Excel, but are there ways to solve this problem?




Seaq

How to replace a formula string with * in the leading position
 
Very useful, thanks a lot!

"T. Valko" wrote:

Try it like this:

~*sum(...)

In EditReplace Excel thinks the asterisk is a wildcard. You need to tell it
that the asterisk is the literal asterisk character. You do that by
preceding the asterisk or any other wildcard like the question mark ? with
the tilde character ~.

--
Biff
Microsoft Excel MVP


"Seaq" wrote in message
...
It's convenient to use Edit -- Replace tool to change part of a formula
string with repeated characters, but strings that starting leading by the
asterisk mark (*) seem to be an exception, for instance, if your want to
replace a selected area with something like b7*sum(....) to b7/sum(...),
you
input find "*sum(...)" replace by "/sum(...)", all you can get is
"/sum(...)"

Maybe (*) is reserved by Excel, but are there ways to solve this problem?





T. Valko

How to replace a formula string with * in the leading position
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"Seaq" wrote in message
...
Very useful, thanks a lot!

"T. Valko" wrote:

Try it like this:

~*sum(...)

In EditReplace Excel thinks the asterisk is a wildcard. You need to tell
it
that the asterisk is the literal asterisk character. You do that by
preceding the asterisk or any other wildcard like the question mark ?
with
the tilde character ~.

--
Biff
Microsoft Excel MVP


"Seaq" wrote in message
...
It's convenient to use Edit -- Replace tool to change part of a formula
string with repeated characters, but strings that starting leading by
the
asterisk mark (*) seem to be an exception, for instance, if your want
to
replace a selected area with something like b7*sum(....) to
b7/sum(...),
you
input find "*sum(...)" replace by "/sum(...)", all you can get is
"/sum(...)"

Maybe (*) is reserved by Excel, but are there ways to solve this
problem?








All times are GMT +1. The time now is 11:44 PM.

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