+ Reply to Thread
Results 1 to 8 of 8

How to check in column and if different prompt user and restrict users?

  1. #1
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Exclamation How to check in column and if different prompt user and restrict users?

    Currently, i have an column with an drop down i would like that for when user select different row if the user select in that column something not compatible it will prompt the user that this is not allow and restrict the user for adding in or typing in till they reselect the drop down, in vba

    I have make an example Marco workbook where my category i have an drop down list, user are allow to select the same name however, 3G and 4D are not allow to be selected when 4D is selected, it will prompt the user that this is not allow and restrict the user for doing anything next, so how can i do this in VBA ?
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to check in column and if different prompt user and restrict users?

    Not exactly clear what you want, but try this:

    1) Copy this code.
    2) Right-Click the sheet tab of interest.
    3) Select "View Code"
    4) Paste the code into the window that appears.
    5) Save the file as a macro-enabled .xlsm file.
    6) Make changes as needed

    Please Login or Register  to view this content.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: How to check in column and if different prompt user and restrict users?

    Thanks it work perfectly of what i wanted where the user cant select the it
    can i from this add on with using or ?

  4. #4
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: How to check in column and if different prompt user and restrict users?

    @Bernie Deitrick

    I have added an 4D, 4O, 6A, 6B, 3G, 4A, 4B, 4C, 4H, 4K, 4P

    Now i want that same situation where 4D cant put 3G etc

    4D, 4O, 6A, 6B belong together
    3G, 4A, 4B, 4C, 4H, 4K, 4P belong to another group

    I wan that now if they choose 4d group in column A then if i they choose 3g group they will get that msg box to prompt user
    how can i do it ?

    i have reattempt a new excel file

    I have readded from the script i given now how can i check my first a2 on the drop down then follow on a3 if a2 belong to the it asset or non it asset and warm the user ?
    Attached Files Attached Files
    Last edited by excelvbanew; 04-26-2023 at 12:25 AM.

  5. #5
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to check in column and if different prompt user and restrict users?

    That is a task better solved with a different technique.

    Fill 4 cells in a column with 4D, 4O, 6A, 6B then select them, and name them something like "Group1"
    Fill 6 cells in a column with 3G, 4A, 4B, 4C, 4H, 4K, 4P then select them, and name them something like "Group2"

    Then have a cell - say, D1 - with Data Validation and the list option, with Group1,Group2 as the list

    Then for all the other cells, use Data Validation with the list option, with =INDIRECT($D$1) as the source.

    Then the data validation will do the work for you once you have select the group from the DV of D1.

  6. #6
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: How to check in column and if different prompt user and restrict users?

    Quote Originally Posted by Bernie Deitrick View Post
    That is a task better solved with a different technique.

    Fill 4 cells in a column with 4D, 4O, 6A, 6B then select them, and name them something like "Group1"
    Fill 6 cells in a column with 3G, 4A, 4B, 4C, 4H, 4K, 4P then select them, and name them something like "Group2"

    Then have a cell - say, D1 - with Data Validation and the list option, with Group1,Group2 as the list

    Then for all the other cells, use Data Validation with the list option, with =INDIRECT($D$1) as the source.

    Then the data validation will do the work for you once you have select the group from the DV of D1.
    I see what u mean but this is in 1 single drop down where in my business process where now currently is like in 1 column and if they choose the first is fine but if they choose the 2nd it check and prompt them

  7. #7
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,947

    Re: How to check in column and if different prompt user and restrict users?

    It's really a lot simpler this way. Give it a try.
    Attached Files Attached Files

  8. #8
    Forum Contributor
    Join Date
    04-08-2023
    Location
    Singapore
    MS-Off Ver
    365, 2021
    Posts
    113

    Re: How to check in column and if different prompt user and restrict users?

    nice this will work too

    Thanks

+ 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] Check range of cells in column if not null/empty then restrict save and show message
    By gmalpani in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-07-2020, 09:25 AM
  2. Check cells for blanks then prompt user
    By papasmurfuo9 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-28-2013, 05:09 AM
  3. Prompt for password after selecting from dropdown, also restrict data
    By balaji3081 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-11-2013, 04:41 PM
  4. Macro to prompt user to check Subject when send button is clicked
    By hotmailliw in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-01-2013, 10:01 AM
  5. Excel VBA to generate check boxes and restrict user to tick on the 3 boxes in a row
    By rhodalynn.rona in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-06-2012, 05:55 AM
  6. Finding duplicates in a column, prompt user then delete the current one
    By Lifeseeker in forum Excel Programming / VBA / Macros
    Replies: 26
    Last Post: 01-23-2012, 08:24 PM
  7. restrict users
    By Restricted user access for exel workbook in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-15-2006, 11:30 AM

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