+ Reply to Thread
Results 1 to 7 of 7

How to restrict user to make wrong selection in Drop down list?

  1. #1
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    How to restrict user to make wrong selection in Drop down list?

    Hi friends,

    I have created a dependent drop down list for State, District and block.

    If a user selected a drop down list then it is possible to change the name of State or District by other user resulting a wrong State, District and Block selection. I don't want to allow any user to change such wrong indirect selection.

    For example:
    If user select State 'B'; then the district should be either 'R, S, T'.
    Here it is possible to change the State 'B' to either 'A, C, D, E' which is wrong after the selection by first user.
    It's also possible to change the District after selection by first user.

    I want to restrict the user to change dependent list. If the user wants to change the drop down list then he must have to change the dependent list.
    In short ...
    If he changed the State then he must change District and Block.
    If he changed the District then he must change Block.

    Any help will be highly appreciated.

    Thanking you,
    Attached Files Attached Files
    Sincerely,

    mso3

  2. #2
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: How to restrict user to make wrong selection in Drop down list?

    maybe check for correspondence between j6,k6 & l6 before further calculations&?

  3. #3
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to restrict user to make wrong selection in Drop down list?

    Yes,

    Thank you.

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: How to restrict user to make wrong selection in Drop down list?

    Insert the code below in tab "Personal":

    Right-click tab, select "view code" and paste code.

    If State is changed, then District is set to blank and if District is changed Block is set to blank

    Please Login or Register  to view this content.
    See http://www.contextures.com/xlDataVal02.html#clear

    Change 10 and 11 in code for your actual columns
    Attached Files Attached Files

  5. #5
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to restrict user to make wrong selection in Drop down list?

    Hi John,

    Thank you. It's very close to my requirement. I have made a little amendment in it to clear 2 columns to the right if the user edit State.

    Requirement:

    If the user edit State clear 2 columns to right. That is District and Block.
    If the user edit District then clear 1 column to left and 1 column to right. That is State and Block.
    If the user edit block then clear 2 columns to left. That is State and District.

    In short I want to select the drop down list from column 'J' to 'L' direction only. User can not edit the drop down list from District or Block.

    Please Login or Register  to view this content.
    Please tell me what is the meaning of
    Please Login or Register  to view this content.
    Thank you.

  6. #6
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,209

    Re: How to restrict user to make wrong selection in Drop down list?

    You cannot clear State/District if you enter Block because entry of Block is treated as a Change to it will clear State/District.

    As block SHOULD be dependent on State/District it makes no sense to clear these.

    Please Login or Register  to view this content.
    If Target.Validation.Type = 3 =DATA VALIDATION

  7. #7
    Forum Contributor
    Join Date
    06-29-2014
    Location
    India
    MS-Off Ver
    2010 Windows 10 64 bits
    Posts
    1,269

    Re: How to restrict user to make wrong selection in Drop down list?

    Hi John,

    Thank you.

    Have a nice time.

+ 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. Replies: 5
    Last Post: 12-17-2015, 06:43 AM
  2. Make same selection for multiple drop down list and clear all for all dropdown list
    By salomip13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-30-2014, 01:34 PM
  3. [SOLVED] Combine 2 data sets into one list based on user selection in drop downs.
    By Sassy13 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 04-01-2013, 01:46 PM
  4. Looking to code combo/drop down list user selection and display formula results
    By toddbailey in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 02-07-2012, 06:17 PM
  5. Data Validation: Need to restrict drop-down selection
    By splenguin in forum Excel General
    Replies: 5
    Last Post: 09-08-2009, 03:46 PM
  6. How to make a multiple-selection drop down list?
    By Cuibi in forum Excel General
    Replies: 1
    Last Post: 06-24-2009, 01:09 AM
  7. Drop Down List:make the selection
    By diannk in forum Excel General
    Replies: 4
    Last Post: 08-19-2007, 01:59 PM

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