Excel User Group
Microsoft Excel blogs, forums, files. Read, ask questions, provide answers.

Percent (%) Replaces comma (,) in Formulas causing them to fail edit

Latest post Mon, Jul 19 2010 2:19 PM by win_zip. 5 replies.
  • Wed, Jul 7 2010 5:42 PM

    Percent (%) Replaces comma (,) in Formulas causing them to fail edit

    Excel 2007 exhibits odd behavior for me now, whether I am creating a new formula or opening up an earlier created sheet (which was and is fine). 

    As an example for this report, I created a simple formula =if(A1=A2,1,0), by selecting A1 and A2.  The result is this formula that is shown in the cell and in the edit box above the sheet.   I first found the problem in a much more complex formula. 

    When trying to save the formula in the cell, though, Excel reports "The formula you typed contains an error".  The help text shown below the cell with the formula is: IF(logical_test% [value_if_true]%[value_if_false]).  The highlighed portion shows the reported error of "A2,1,0" without the quotes of course.

    Looks like there is some translation going on from the creation of the forumula and then its edit.  When I look at a formula that works perfectly fine in a sheet that existed before this problem started to happen, it has a bunch of % where commas should be.  However, if I dont touch it (leave it as it was) it still works exactly as it shoul

    Any idea what is causing this?  Is my installatin corrupted?

    • Post Points: 21
  • Thu, Jul 8 2010 8:59 AM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 543
    • Points 9,287
    • MVP

    Re: Percent (%) Replaces comma (,) in Formulas causing them to fail edit

    Jeff

    Interesting. I would look at thinks in this order

    1. Check Autocorrect in excel options under the office button and see if there is a ',' replaced with '%' entry
    2. Disable any add-ins that may be loading, again through excel options
    3. Make sure you have the correct language loaded under excel options.

    Passed that there may be something more sinister at play but post back when you've tried these

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 21
  • Thu, Jul 8 2010 10:10 AM In reply to

    Re: Percent (%) Replaces comma (,) in Formulas causing them to fail edit

    Thanks for such a prompt suggestion.

    1.  Autocorrect does not touch either "," or "%".

    2.  The only add-in that is enabled is the "Get Started Tab" mscoree.dll.  I removed it and restarted Excel, with same results as before.

    3.  Language setting is "English (U.S.)" as it has always been.

    Note that the reported problem occurred recently; previously Excel behaved just fine and as mentioned earlier created sheets have formulas working properly (but if I try to edit them they fail the Excel formula edit).

    Additional testing confirms I can create formulas successfully AS LONG AS a comma is not needed.  For example, =average(A1:A10) works just fine, but =average(A1,A10) fails BECAUSE WHEN TRYING TO SAVE EXCEL BUILDS IT AS =average(A1%A10) and that fails the formula edit.  The simpler =average(5,4) gets created as =average(5%4) then fails edit too.

    I just tried creating a (badly sytaxed formula) =average(A1%a10) (hoping Excel might understand this) but that fails the edit too.  So it is building wrong, putting out wrong help text, BUT, editing properly!

    • Post Points: 21
  • Thu, Jul 8 2010 1:24 PM In reply to

    • Nick Hodge
    • Top 10 Contributor
    • Joined on Sun, Dec 23 2007
    • Southampton
    • Posts 543
    • Points 9,287
    • MVP

    Re: Percent (%) Replaces comma (,) in Formulas causing them to fail edit

    Jeff

    The only way I can replicate this every time is by entering the characters in auto correct. I would therefore still suspect that. It may be something malicious like a virus that is doing this?

    Apart from that, i'm stumped. The only reason I mention the language pack loaded was because, for example, i think Dutch uses ; instead of , not that I would know if another language uses % instead of , that would seem a bit strange

    Regards
    Nick Hodge
    Microsoft MVP, Excel
    Southampton, UK

    • Post Points: 21
  • Wed, Jul 14 2010 5:11 PM In reply to

    Re: Percent (%) Replaces comma (,) in Formulas causing them to fail edit

    SOLVED, exact reason unknown.

    Something in the configuration for my user account caused this problem.  We were able to confirm this by logging into my PC as a different (new) user and Excel behaved just fine.  Therefore, I had to create a new user account to use, migrate all the customization I had to the new user (printers, autocorrects, etc etc) and then deleted the "old" user account.

    Things are back to normal!

    • Post Points: 21
  • Mon, Jul 19 2010 2:19 PM In reply to

    • win_zip
    • Not Ranked
    • Joined on Mon, Jul 19 2010
    • Posts 1
    • Points 5

    Re: Percent (%) Replaces comma (,) in Formulas causing them to fail edit

    Not exactly addressing the question but same formula simply put  =--(a1=b1)

    • Post Points: 5
Page 1 of 1 (6 items) | RSS
Copyright Excel User Group and the relevant contributors, 2010. All Trade Marks acknowledged. This site is a peer-to-peer site and NOT affiliated in any way to Microsoft Corp. All rights reserved.