Another of Excel's idiosyncrasis

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

In the formula "=ROUND(Data!G242*0.975*0.5*0.975,0)", if I need to do an
edit, replace to eliminate the portion "*.975,0)" and replace that with
",0)", Excel insists on screwing up the whole formula and resulting cell
entry is ",0)"

This is so stupid of Excel to do it that way, when I am only wanting a
portion replaced. How do I get around this most inconvenient indiosyncracy of
Excel in this case?

Thanks,
 
Buce wrote...
In the formula "=ROUND(Data!G242*0.975*0.5*0.975,0)", if I need to do an
edit, replace to eliminate the portion "*.975,0)" and replace that with
",0)", Excel insists on screwing up the whole formula and resulting cell
entry is ",0)"

This is so stupid of Excel to do it that way, when I am only wanting a
portion replaced. How do I get around this most inconvenient indiosyncracy of
Excel in this case?

* and ? are wildcard characters, * matching any text, ? matching any
single character. If you try to find

*.975,0)

the * will match all characters to the left of .975,0), so you're
matching the entire formula. You need to use ~* to represent a literal
asterisk. So search for

~*0.975,0)

[note: you need to include the 0 to the left of the decimal place].
 
Buce

Not an idiosyncracy, but a question of search wildcards.

The asterisk "*" is a wildcard in a find and replace.

To find and replace an * you must preface with a tilde(~)

Try finding "~*0.975,0)" and replacing with ",0"

Same for finding a ? mark. "~?" must be used.


Gord Dibben Excel MVP
 
Thanks, I should of remembered things like that, but I run into that
situation to infrequently to remember I guess.

Bruce

Harlan Grove said:
Buce wrote...
In the formula "=ROUND(Data!G242*0.975*0.5*0.975,0)", if I need to do an
edit, replace to eliminate the portion "*.975,0)" and replace that with
",0)", Excel insists on screwing up the whole formula and resulting cell
entry is ",0)"

This is so stupid of Excel to do it that way, when I am only wanting a
portion replaced. How do I get around this most inconvenient indiosyncracy of
Excel in this case?

* and ? are wildcard characters, * matching any text, ? matching any
single character. If you try to find

*.975,0)

the * will match all characters to the left of .975,0), so you're
matching the entire formula. You need to use ~* to represent a literal
asterisk. So search for

~*0.975,0)

[note: you need to include the 0 to the left of the decimal place].
 

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

Back
Top