Consulting

Results 1 to 2 of 2

Thread: Validation

  1. #1
    VBAX Regular
    Joined
    Jun 2013
    Posts
    13
    Location

    Validation

    I need to validate an information like this
    __A____B_C
    Name 1 w w ....
    Name 2 w w ....
    Name 3 o o ....
    Name 1 o w.
    Name 2 w w.
    so I need to do a conditional format showing (color or text box) the user that he can't use "w" again to "Name 1" or "Name 2", becouse he already chose "w" before and he can't choose again, for either column from B to L and lines 1 to 5 for example.
    I thought use a data validation using countif with lookup, but i couldn't make it. I'm trying to write VBA right now, but I still think there is a easier and simpler way! (I'm storing the first name and running a loop to compare if there is another equal name then check if there is the same entry on the same column.

    Thank you

  2. #2
    Mac Moderator VBAX Guru mikerickson's Avatar
    Joined
    May 2007
    Location
    Davis CA
    Posts
    2,778
    Try putting this validation on B2. and then copy the validation to the other cells/columns.

    =SUMPRODUCT(($A$1:$A2=$A2)*(B$1:B2=B2))=1

Posting Permissions

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