Results 1 to 4 of 4

Thread: Formula (2003)

  1. #1
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Formula (2003)

    Hi,

    I can't work out how to get this formula to work?

    =IF(C6="","",IF(COUNT(C6=16),"","ERROR - NOT 16 DIGITS"))

    Any ideas?

    Thanks
    Nathan

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formula (2003)

    COUNT is used to count cells, not to count characters in a cell. Moreover, the parentheses aren't placed correctly. Try
    <code>
    =IF(LENGTH(C6)=16,"","Error - not 16 digits")</code>

  3. #3
    Bronze Lounger
    Join Date
    Sep 2007
    Posts
    1,203
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Formula (2003)

    Thanks Hans,I knew it was something stupid that I was doing wrong!. LENGTH does not work for me but LEN does, I presume that is something to do with the version?. (2003). I have used:

    =IF(C6="","",IF(LEN(C6)=16,"","ERROR - NOT 16 DIGITS"))

    which works. Out of curiosity though,why does the cell c6 have its own brackets?

    Thanks
    Nathan

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Formula (2003)

    No, sorry, that was my mistake, it should be LEN indeed.

    LEN(C6) is the length of the value of cell C6. LEN(C6)=16 is true if the length is equal to 16, and false otherwise.

Posting Permissions

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