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

    length check (2002)

    Hi,
    A21 - =IF(E21="","",LEN(E21))
    B21 - =IF(E21="","",IF(A21=16,"","NOT 16 DIGITS"))

    This works fine, but I am trying (unsuccessfully) to merge the two, something like:

    =IF(E21="","",IF(LEN(E21=16),"","NOT 16 DIGITS")) but this does not show errors when there are <> 16. ?

  2. #2
    WS Lounge VIP sdckapr's Avatar
    Join Date
    Jul 2002
    Location
    Pittsburgh, Pennsylvania, USA
    Posts
    11,225
    Thanks
    14
    Thanked 342 Times in 335 Posts

    Re: length check (2002)

    <img src=/S/whisper.gif border=0 alt=whisper width=29 height=17> You need something like:
    =IF(OR(E21="",LEN(E21)=16),"","NOT 16 DIGITS")

    Or if E21 is blank, it will display the message ...

    Steve

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

    Re: length check (2002)

    Of course, <img src=/S/blush.gif border=0 alt=blush width=15 height=15>

    Thanks for that!

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

    Re: length check (2002)

    You've placed the parentheses incorrectly.

    =IF(E21="","",IF(LEN(E21)=16,"","NOT 16 DIGITS"))

    Erroneous shorter formula removed by HansV - thanks, Steve!

  5. #5

Posting Permissions

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