+ Reply to Thread
Results 1 to 4 of 4

Checking that the correct item is selected from drop list

  1. #1
    Registered User
    Join Date
    12-07-2018
    Location
    Indianapolis
    MS-Off Ver
    2016
    Posts
    2

    Checking that the correct item is selected from drop list

    I need to check if the value selected in a drop down list is equal to the value of another cell and return an error message if it doesn't.

  2. #2
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,310

    Re: Checking that the correct item is selected from drop list

    Well, here's something close to literally what you have asked:

    1. In A1:A4 type your drop-down list values: cat, dog, unicorn, fish

    2. Developer tab / Insert: Add a Combo Box (form control) then format control:
    - Set Input range to A1:A4
    - Set Cell link to B1

    3. Put the value that you want to check against in E3 (one of cat, dog, unicorn or fish)

    4. In D4 enter the formula:
    =IF(INDEX(A1:A4,B1)<>E3,"ERROR: Selected value is not equal to " & E3, "")
    This cell will display an error message if cell E3 does not match the Combo Box selection.

    See the attached spreadsheet for an implementation of the above.

    Is this close to what you are looking for??
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    12-07-2018
    Location
    Indianapolis
    MS-Off Ver
    2016
    Posts
    2

    Re: Checking that the correct item is selected from drop list

    SOLVED. Thank you. This was exactly what I needed.

  4. #4
    Forum Expert
    Join Date
    10-15-2018
    Location
    MA, USA
    MS-Off Ver
    2010, 2019
    Posts
    1,310

    Re: Checking that the correct item is selected from drop list

    No problem - glad I could hep.

+ 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: 16
    Last Post: 01-25-2018, 12:18 PM
  2. [SOLVED] Active X drop down list - always return to the item in the list that was selected.
    By Aland2929 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 02-14-2017, 09:41 AM
  3. Data fill to another cell based on the item selected from drop down list
    By Hussain Anees in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-27-2016, 01:08 PM
  4. Display multiple value when item selected in drop down list
    By peter.lu in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-15-2015, 05:06 PM
  5. Replies: 1
    Last Post: 08-13-2015, 11:57 AM
  6. Run macro when item from drop-down list is selected
    By barnett2000 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 08-09-2013, 12:52 PM
  7. How to get index of selected item in drop down list?
    By nleahcim in forum Excel General
    Replies: 3
    Last Post: 08-08-2011, 02:08 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