Closed Thread
Results 1 to 3 of 3

Determine if character is text or numeric?

  1. #1
    Ed
    Guest

    Determine if character is text or numeric?

    Within a range, I have designators that should be in the format "B-123".
    But I have occasions where the "-" was left out. I also have occasions
    where there is an entire word there (ie: "Basic"). So I will run down the
    column, setting the value of each cell into a string and check the second
    character (Right (Left (strCell, 2), 1); if it's numeric, I need to replace
    "B" with "B-". But I can't figure out how to check if that character is
    text or numeric. Any help is appreciated.

    Ed



  2. #2
    Fredrik Wahlgren
    Guest

    Re: Determine if character is text or numeric?


    "Ed" <ed_millis@NO_SPAM.yahoo.com> wrote in message
    news:[email protected]...
    > Within a range, I have designators that should be in the format "B-123".
    > But I have occasions where the "-" was left out. I also have occasions
    > where there is an entire word there (ie: "Basic"). So I will run down the
    > column, setting the value of each cell into a string and check the second
    > character (Right (Left (strCell, 2), 1); if it's numeric, I need to

    replace
    > "B" with "B-". But I can't figure out how to check if that character is
    > text or numeric. Any help is appreciated.
    >
    > Ed
    >
    >


    There's an ISNUMBER function that you can use:
    http://www.techonthenet.com/excel/formulas/isnumber.htm
    /Fredrik



  3. #3
    Jim Thomlinson
    Guest

    RE: Determine if character is text or numeric?

    There is a function called isnumeric. You may have difficulty with the -
    charachter as is numeric will see that as a negative sign...

    HTH

    "Ed" wrote:

    > Within a range, I have designators that should be in the format "B-123".
    > But I have occasions where the "-" was left out. I also have occasions
    > where there is an entire word there (ie: "Basic"). So I will run down the
    > column, setting the value of each cell into a string and check the second
    > character (Right (Left (strCell, 2), 1); if it's numeric, I need to replace
    > "B" with "B-". But I can't figure out how to check if that character is
    > text or numeric. Any help is appreciated.
    >
    > Ed
    >
    >
    >


Closed 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