+ Reply to Thread
Results 1 to 5 of 5

Very weird error

Hybrid View

Guest Very weird error 11-21-2005, 02:40 PM
Guest Re: Very weird error 11-21-2005, 03:25 PM
Guest Re: Very weird error 11-21-2005, 04:25 PM
Guest Re: Very weird error 11-21-2005, 04:45 PM
Guest Re: Very weird error 11-21-2005, 06:55 PM
  1. #1
    Stian
    Guest

    Very weird error

    The following code is working for everyone but me:

    =IF(MOD((i_LoadHeavy*2),3)>0,
    TEXT((i_LoadHeavy*2)/3,"###.#"),(i_LoadHeavy*2)/3)

    This code is part of a worksheet used by many and developed by some guy on
    the internet. When I try to load this worksheet into my Excel 2003 I get
    complaints from the program.

    On the codeline above, the program says the comma in the MOD function is
    wrong and that the commas in the TEXT function is wrong. If the commas are
    replaced by a semicolon it works fine. This, even though the help files say a
    comma is perfectly fine.

    The program also complains about the format: "###.#" for the TEXT function.
    If I replace the dot with a comma it works.

    Why does this line of code work for every other use of this worksheet but
    not for me? Why are my functions seemingly different from others?

    I have removed and reinstalled Office, but to no avail.
    I am using Windows XP and Office 2003.

    Any ideas?



  2. #2
    Ron Rosenfeld
    Guest

    Re: Very weird error

    On Mon, 21 Nov 2005 10:36:21 -0800, "Stian" <Stian@discussions.microsoft.com>
    wrote:

    >The following code is working for everyone but me:
    >
    >=IF(MOD((i_LoadHeavy*2),3)>0,
    >TEXT((i_LoadHeavy*2)/3,"###.#"),(i_LoadHeavy*2)/3)
    >
    >This code is part of a worksheet used by many and developed by some guy on
    >the internet. When I try to load this worksheet into my Excel 2003 I get
    >complaints from the program.
    >
    >On the codeline above, the program says the comma in the MOD function is
    >wrong and that the commas in the TEXT function is wrong. If the commas are
    >replaced by a semicolon it works fine. This, even though the help files say a
    >comma is perfectly fine.
    >
    >The program also complains about the format: "###.#" for the TEXT function.
    >If I replace the dot with a comma it works.
    >
    >Why does this line of code work for every other use of this worksheet but
    >not for me? Why are my functions seemingly different from others?
    >
    >I have removed and reinstalled Office, but to no avail.
    >I am using Windows XP and Office 2003.
    >
    >Any ideas?
    >


    The separators are controlled by your Windows Regional settings (Start/Control
    Panel/Regional and Language Options. Yours are set differently than the
    others.


    --ron

  3. #3
    Stian
    Guest

    Re: Very weird error

    Thanks for helping out Ron, that solved my problem.

    Is there anything the developer can do to make this work no matter what
    regional settings a user has?


  4. #4
    Ron Rosenfeld
    Guest

    Re: Very weird error

    On Mon, 21 Nov 2005 12:23:02 -0800, "Stian" <Stian@discussions.microsoft.com>
    wrote:

    >Thanks for helping out Ron, that solved my problem.
    >
    >Is there anything the developer can do to make this work no matter what
    >regional settings a user has?


    I don't know enough about that sort of thing to answer.

    Perhaps he could avoid the TEXT function by formatting the cell appropriately.
    Or perhaps he could detect the locality using VBA and change various formulas
    accordingly.


    --ron

  5. #5
    Gord Dibben
    Guest

    Re: Very weird error

    Stian

    I would assume that your Regional Options need changing back to English(US).

    Semi-colons and commas for decimal points are a European thing, I believe.

    Start>Control Panel>Regional and Language Options.

    Check your settings here.

    Also check settings under Excel Tools>Options>International for decimal
    seperator.


    Gord Dibben Excel MVP

    On Mon, 21 Nov 2005 10:36:21 -0800, "Stian" <Stian@discussions.microsoft.com>
    wrote:

    >The following code is working for everyone but me:
    >
    >=IF(MOD((i_LoadHeavy*2),3)>0,
    >TEXT((i_LoadHeavy*2)/3,"###.#"),(i_LoadHeavy*2)/3)
    >
    >This code is part of a worksheet used by many and developed by some guy on
    >the internet. When I try to load this worksheet into my Excel 2003 I get
    >complaints from the program.
    >
    >On the codeline above, the program says the comma in the MOD function is
    >wrong and that the commas in the TEXT function is wrong. If the commas are
    >replaced by a semicolon it works fine. This, even though the help files say a
    >comma is perfectly fine.
    >
    >The program also complains about the format: "###.#" for the TEXT function.
    >If I replace the dot with a comma it works.
    >
    >Why does this line of code work for every other use of this worksheet but
    >not for me? Why are my functions seemingly different from others?
    >
    >I have removed and reinstalled Office, but to no avail.
    >I am using Windows XP and Office 2003.
    >
    >Any ideas?
    >



+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1