+ Reply to Thread
Results 1 to 7 of 7

How To do data validation for matching entries between 2 cells based on input in 3rd cell

  1. #1
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    How To do data validation for matching entries between 2 cells based on input in 3rd cell

    I would like to apply data validation to cell K3 based on A3

    The value of K3 only comes up after a correct numerical code is entered in K4 (based on the formula in K3 referencing Source! )

    basically I want the file to reject the entry in K4 if the resulting value on K3 does not match A3

    so as to prevent a different user signing off on a time log that is not tied to their ID

    as it currently set up any one can sign off any time log entry... (resulting in the signee being different from A3) the goal is so that only the person selected in A3 can successfully enter a code in K4 so that the K3=A3
    Attached Files Attached Files
    Last edited by diddy47; 02-03-2020 at 07:16 AM.

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How To do data validation for matching entries between 2 cells based on input in 3rd

    In a copy of your file, delete all the formulas in column K. Copy and paste this macro into the worksheet code module. Do the following: right click the tab name for your "Time Log" sheet and click 'View Code'. Paste the macro into the empty code window that opens up. Close the code window to return to your sheet. Make an entry in K4 and press the RETURN key.
    Please Login or Register  to view this content.
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    Re: How To do data validation for matching entries between 2 cells based on input in 3rd

    thank you......the code works very well

  4. #4
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    Re: How To do data validation for matching entries between 2 cells based on input in 3rd

    Is there a way to make it work with the cell K3 being protected (before or after?) so that someone can't just delete the generated value in K3 and i suppose K4 would need to lock after a successful entry as well to prevent any alterations?
    Last edited by diddy47; 02-03-2020 at 10:23 AM.

  5. #5
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How To do data validation for matching entries between 2 cells based on input in 3rd

    Start by unlocking all the cells in the sheet "Time Log". Then replace the previous macro with the one below:
    Please Login or Register  to view this content.
    In order to lock the cells, the sheet must be protected. Change the password in the code (in red) to a password of your choosing.

  6. #6
    Registered User
    Join Date
    08-27-2018
    Location
    London
    MS-Off Ver
    office 2016
    Posts
    45

    Re: How To do data validation for matching entries between 2 cells based on input in 3rd

    thank you for this, the code works just perfectly, If I can please ask for you assistance once more.

    I just noticed there is a flaw in the excel sheet. How to make it so that A3:J3 ( and subsequent rows A5:J5 etc) is locked after is L5 (MOD sign) signed to complete the data entry for that employee. Ideally L4 will lock as well after entry
    Last edited by diddy47; 02-07-2020 at 05:37 PM.

  7. #7
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,821

    Re: How To do data validation for matching entries between 2 cells based on input in 3rd

    Try:
    Please Login or Register  to view this content.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Data Validation based on value of another cell + length of input
    By tiger99 in forum Excel General
    Replies: 4
    Last Post: 11-20-2019, 12:16 AM
  2. [SOLVED] Trouble using Data Validation/Custom to prevent entries based on text in another cell
    By LSR1011 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 03-06-2014, 06:04 PM
  3. [SOLVED] Prevent matching entries on same row from appearing in the Data Validation dynamic range.
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 6
    Last Post: 12-22-2013, 01:32 PM
  4. [SOLVED] Find matching record based on data input in different cell
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 7
    Last Post: 11-25-2013, 08:51 AM
  5. Replies: 0
    Last Post: 10-03-2013, 02:02 AM
  6. Using Data Validation Lists based on input of another Cell
    By jlundberg in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-02-2013, 11:29 AM
  7. get cells to populate based off two data validation entries:
    By krisba in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-08-2011, 05:42 PM

Tags for this Thread

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