+ Reply to Thread
Results 1 to 4 of 4

How to use data validation to restrict data entry based on another cell's value

  1. #1
    Registered User
    Join Date
    03-03-2015
    Location
    Ontario, CA, USA
    MS-Off Ver
    2007
    Posts
    4

    Question How to use data validation to restrict data entry based on another cell's value

    Hi,

    I would like to know how to use Data Validation feature to restrict data entry of certain cells based on the value of a control cell.

    Specifically, in my scenario, I have a cell e.g., A1, where I want to be able to enter a number range of 1 through 4.

    Based on A1, I want B1:B4 to allow or restrict data entry based on the number value of A1. E.g., if A1=4, B1:B4 will allow data entry. If A1=1, only B1 will allow data entry. Furthermore, if A1 does not have any value inputted or if value inputted is not equal to numbers 1 through 4, B1:B4 will not allow any data entry.

    Looking for the best way to do this? Thank you for your help!

  2. #2
    Registered User
    Join Date
    03-03-2015
    Location
    Ontario, CA, USA
    MS-Off Ver
    2007
    Posts
    4

    Re: How to use data validation to restrict data entry based on another cell's value

    I am currently applying to A1 criteria whole number between 1 and 4, and for B1 "=AND(A1>=1,A1<=4)", B2 "=AND(A1>=2,A1<=4)", etc.

    However, the issue I'm running into now is that if I change A1 from 2 to 1, B2 will still have the data remaining in the cell. Is there a way to "refresh" the validation? I'd rather avoid the use of macros, but will I need to do so? Thank you!

  3. #3
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,479

    Re: How to use data validation to restrict data entry based on another cell's value

    No, it won't refresh until the cell is selected again.

    What you can do is to use a formula in the adjacent cells (column C) to highlight when the entries in column B become invalid due to a change in A1 - you can use a red bolded message to alert the user to the fact that the cell is no longer valid. Another approach is to use conditional formatting on the cells in column B to change the background colour to red, to indicate that they need to be changed.

    Hope this helps.

    Pete

  4. #4
    Forum Expert
    Join Date
    03-20-2015
    Location
    Primarily UK, sometimes NL
    MS-Off Ver
    Work: Office 365 / Home: Office 2010
    Posts
    2,405

    Re: How to use data validation to restrict data entry based on another cell's value

    If you don't mind a macro, this thread may help: http://www.excelforum.com/excel-prog...alidation.html
    Regards,
    Aardigspook

    I recently started a new job so am a bit busy and may not reply quickly. Sorry - it's not personal - I will reply eventually.
    If your problem is solved, please go to 'Thread Tools' above your first post and 'Mark this Thread as Solved'.
    If you use commas as your decimal separator (1,23 instead of 1.23) then please replace commas with semi-colons in your formulae.
    You don't need to give me rep if I helped, but a thank-you is nice.

+ 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. restrict data entry basing on adjacent cell value
    By tkraju in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-11-2014, 01:45 PM
  2. Restrict data entry if preceeding cell value is greater than or blank
    By GreggTO in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-07-2013, 11:46 AM
  3. Replies: 2
    Last Post: 03-12-2013, 03:27 AM
  4. Replies: 4
    Last Post: 02-01-2013, 10:18 AM
  5. Restrict data entry based on another cell
    By northbank in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-13-2012, 11:33 AM
  6. NEED HELP - How to disable a cell to restrict data entry
    By Sriram in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-18-2006, 10:50 AM
  7. [SOLVED] Restrict Data Entry, data validation
    By Dan Connors in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-03-2006, 10:10 AM
  8. [SOLVED] data validation to restrict input in cell based on value of cell above that cell
    By NC in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-25-2005, 04:06 AM

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