+ Reply to Thread
Results 1 to 5 of 5

data 'is not number' character query

Hybrid View

  1. #1
    Registered User
    Join Date
    03-04-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    40

    data 'is not number' character query

    Hello there,

    I am trying to help someone out with a possible formula.

    They have a list of data numbers which are yy/#####/@@@@@ (2digit year/casenumber/alphanumeric code)

    Where some people have typed in the code wrong (6 or more digits in case number) we want to know is there a way of doing this.

    Ideally I want something that says "If 9th character is a slash then yes, if not no" or "if 9th character is a number then yes, if not, no"

    If that makes sense?

    Example of data is (where we want third option highlighted as erroneous (6 not 5 numbers in middle)

    09/56487/KFJT
    09/42105/PLOUR3
    09/002145/PLIFD
    09/02145/ASDF

    Many thanks in advance for any ideas..

    Damien
    Last edited by damo_uk; 10-05-2009 at 07:50 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: data 'is not number' character query

    You mean something like ?

    B1: =MID(A1,9,1)="/"
    copied down (where A1 contains code) ... TRUE means OK, FALSE implies Not OK.

    EDIT: should add the above assumes year is always correct... else 0/123456/ABCD would give impression of OK and you would need to account for that. let us know if an issue.
    Last edited by DonkeyOte; 10-05-2009 at 07:45 AM.

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: data 'is not number' character query

    Try:

    =IF(ISNUMBER(MID(A1,9,1)+0),"Yes",IF(MID(A1,9,1)="/","Yes","No"))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  4. #4
    Registered User
    Join Date
    03-04-2009
    Location
    London, England
    MS-Off Ver
    Excel 2007
    Posts
    40

    Talking Re: data 'is not number' character query

    Ah,

    Thought it would be to do with the mid function but was not sure how to write it.

    Many thanks for your quick replies! Much appreciated.

  5. #5
    Valued Forum Contributor rwgrietveld's Avatar
    Join Date
    09-02-2008
    Location
    Netherlands
    MS-Off Ver
    XL 2007 / XL 2010
    Posts
    1,671

    Re: data 'is not number' character query

    Another approach:
    =AND(CODE(MID(A1,3,1))=47,CODE(MID(A1,9,1))=47)
    Looking for great solutions but hate waiting?
    Seach this Forum through Google

    www.Google.com
    (e.g. +multiple +IF site:excelforum.com/excel-general/ )

    www.Google.com
    (e.g. +fill +combobox site:excelforum.com/excel-programming/ )

    Ave,
    Ricardo

+ 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