• Formula (2003)

    Author
    Topic
    #449578

    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

    Viewing 0 reply threads
    Author
    Replies
    • #1102635

      COUNT is used to count cells, not to count characters in a cell. Moreover, the parentheses aren’t placed correctly. Try

      =IF(LENGTH(C6)=16,"","Error - not 16 digits")

      • #1102643

        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

        • #1102644

          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.

    Viewing 0 reply threads
    Reply To: Formula (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: