+ Reply to Thread
Results 1 to 13 of 13

Data Validation to Ensure Like Numbers in Cell A has Same Date in Cell B

Hybrid View

  1. #1
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Not sure what you mean. Please elaborate.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  2. #2
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408
    Hi NBVC,

    Take a look at the attached file, and re-enter the dates shown so that you could see where the data validation is not working.

    Thanks,
    Gos-C
    Attached Files Attached Files
    Last edited by Gos-C; 01-11-2008 at 01:47 PM.
    Using Excel 2010 & Windows 10
    "It is better to be prepared for an opportunity and not have one than to have an opportunity and not be prepared."

  3. #3
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    This seems to work:

    Select your range starting at cell B2 and in the Data Validation window, select Custom from the Allow section and enter formula:

    =IF(ISNA(MATCH(A2,$A$1:A1,0)),TRUE,B2=INDEX($B$1:B1,MATCH(A2,$A$1:A1,0)))

  4. #4
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408
    Hi NBVC,

    It didn't work. I was able to enter any date for all the numbers.

    Gos-C

  5. #5
    Registered User
    Join Date
    01-25-2007
    Posts
    21

    Data validation tips!

    Hello Gos-C!

    It seems any how you're going to manually enter very first value and then only you wanted to match the same value if the data you're entering also same. As data validation feature only validate pre-set values, I've some tricky vlookup function which will pull the date if any you've already entered in Column "B" upto previous row, then produce a match!

    The code:

    =IF(ISNA(VLOOKUP(a2,$a$1:b2,2,0)),"Enter your date",TEXT(VLOOKUP(a2,$a$1:b2,2,0),"dd/mm/yy"))

    Give a try!

    DOES

  6. #6
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408
    Hi DOES,

    Thanks for your reply. I can't get it to work. Did it work for you? Where am I putting the code (in the Data Validation window)? I am getting an error for any date I enter in any cell from B2 down.

    Gos-C

  7. #7
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898
    Quote Originally Posted by Gos-C
    Hi NBVC,

    It didn't work. I was able to enter any date for all the numbers.

    Gos-C
    It's working fine for me....see attached.

    Enter dates in cells B2 down....

    When you come to B4, if the date doesn;t match what's in B2, you get an error, but if it matches, it is accepted.

    Does it not work for you?
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    09-19-2004
    Location
    Canada
    Posts
    408
    Hi NBVC,

    Yes, it works - great! I must had done something wrong.

    Thanks a million.

    Gos-C

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1