Password Challenge

Help out a company with bad security practices to validate their passwords with Excel!



You are given the following requirements:

– At least six characters long

– No spaces

– At least one number

– At least one special character



Drop your solution in the comments below 🙂

Our solution:

=IF(AND(LEN(F4)>=6;NOT(ISNUMBER(SEARCH(” “;F4)));
COUNT(FIND({0;1;2;3;4;5;6;7;8;9};F4))>0;
COUNT(FIND($K$4:$K$16;F4))>0);”Valid”;”Invalid”)

Share on facebook
Share on linkedin
Share on email
  • Gustav

    Inte den snyggaste lösningen, men den funkar. MĂ„ste finnas ett bĂ€ttre sĂ€tt Ă€n mitt…..

    =AND(LEN(F4)>=6;ISERR(NOT(SEARCH(” “;F4)>0));
    OR(IFERROR(SEARCH(0;F4)>0;FALSE);
    IFERROR(SEARCH(1;F4)>0;FALSE);
    IFERROR(SEARCH(2;F4)>0;FALSE);
    IFERROR(SEARCH(3;F4)>0;FALSE);
    IFERROR(SEARCH(4;F4)>0;FALSE);
    IFERROR(SEARCH(5;F4)>0;FALSE);
    IFERROR(SEARCH(6;F4)>0;FALSE);
    IFERROR(SEARCH(7;F4)>0;FALSE);
    IFERROR(SEARCH(8;F4)>0;FALSE);
    IFERROR(SEARCH(9;F4)>0;FALSE));
    OR(IFERROR(FIND(“!”;F4)>0;FALSE);
    IFERROR(FIND(“@”;F4)>0;FALSE);
    IFERROR(FIND(“#”;F4)>0;FALSE);
    IFERROR(FIND(“$”;F4)>0;FALSE);
    IFERROR(FIND(“&”;F4)>0;FALSE)
    ;IFERROR(FIND(“/”;F4)>0;FALSE);
    IFERROR(FIND(“ÂŁ”;F4)>0;FALSE);
    IFERROR(FIND(“$”;F4)>0;FALSE);
    IFERROR(FIND(“(“;F4)>0;FALSE);
    IFERROR(FIND(“)”;F4)>0;FALSE);
    IFERROR(FIND(“{“;F4)>0;FALSE);
    IFERROR(FIND(“}”;F4)>0;FALSE);
    IFERROR(FIND(“%”;F4)>0;FALSE)))

  • fredrik@scoc.se

    =IF(AND(LEN(F4)>=6;ISERROR(FIND(” “;F4));
    OR(INDEX(ISERROR(MID(F4;SEQUENCE(1;LEN(F4);1;1);1)+0)=FALSE;0));
    OR(INDEX(COUNTIF($K$4:$K$16;MID(F4;SEQUENCE(1;LEN(F4);1;1);1))
    >0;0)));”Valid”;”Invalid”)

Leave a Reply