+ Reply to Thread
Results 1 to 3 of 3

When does ISNUMERIC point to a number?

  1. #1
    Forum Contributor
    Join Date
    03-03-2005
    Posts
    315

    When does ISNUMERIC point to a number?

    Help file indicates ISNUMERIC(expression) evaluates the expression to a boolean value (True or False) depending upon whether it is a number or not. It seems a simple concept. But as he so often does, Tom Ogilvy has dazzled me with the following revelations (which are verified):

    isnumeric("02,21,14.23")
    True
    ? isnumeric("35E1")
    True
    ? isnumeric("34D1")
    True

    I would add that while Isnumeric("5abc") --> False
    Isnumeric("5abc7")--->True
    The presence of the first and last characters being present in the STRING is crucial.

    I await enligtenment. TIA

  2. #2
    Patrick Molloy
    Guest

    RE: When does ISNUMERIC point to a number?

    Excel will try to convert a string to a number. if it can, then ISNUMERIC
    will be true.
    A text string such as "5E2" can be converted to 5 x 10^2 := 500

    however, I get this

    ?isnumeric("5abc7")
    False

    Excel XP, SP3


    "davidm" wrote:

    >
    > Help file indicates ISNUMERIC(expression) evaluates the expression to a
    > boolean value (True or False) depending upon whether it is a number or
    > not. It seems a simple concept. But as he so often does, Tom Ogilvy has
    > dazzled me with the following revelations (which are verified):
    >
    > isnumeric("02,21,14.23")
    > True
    > ? isnumeric("35E1")
    > True
    > ? isnumeric("34D1")
    > True
    >
    > I would add that while Isnumeric("5abc") --> False
    > Isnumeric("5abc7")--->True
    > The presence of the first and last characters being present in the
    > STRING is crucial.
    >
    > I await enligtenment. TIA
    >
    >
    > --
    > davidm
    > ------------------------------------------------------------------------
    > davidm's Profile: http://www.excelforum.com/member.php...o&userid=20645
    > View this thread: http://www.excelforum.com/showthread...hreadid=390472
    >
    >


  3. #3
    Patrice
    Guest

    Re: When does ISNUMERIC point to a number?

    The problem is "what is a number" ?

    If you meant only numbers and decimal and thousands separator, Excel is a
    bit "smarter" than that an will validate a "number" that uses scientific
    notation, currency character etc...

    IMO, most often your best bet is to build your own function depending on
    what exactly you are after (i.e. if you need to handle exactly the format
    you want)...

    --
    Patrice


    "davidm" <davidm.1stdyf_1122444322.0067@excelforum-nospam.com> a écrit dans
    le message de news:davidm.1stdyf_1122444322.0067@excelforum-nospam.com...
    >
    > Help file indicates ISNUMERIC(expression) evaluates the expression to a
    > boolean value (True or False) depending upon whether it is a number or
    > not. It seems a simple concept. But as he so often does, Tom Ogilvy has
    > dazzled me with the following revelations (which are verified):
    >
    > isnumeric("02,21,14.23")
    > True
    > ? isnumeric("35E1")
    > True
    > ? isnumeric("34D1")
    > True
    >
    > I would add that while Isnumeric("5abc") --> False
    > Isnumeric("5abc7")--->True
    > The presence of the first and last characters being present in the
    > STRING is crucial.
    >
    > I await enligtenment. TIA
    >
    >
    > --
    > davidm
    > ------------------------------------------------------------------------
    > davidm's Profile:

    http://www.excelforum.com/member.php...o&userid=20645
    > View this thread: http://www.excelforum.com/showthread...hreadid=390472
    >




+ 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