+ Reply to Thread
Results 1 to 9 of 9

Display dropdown list in cell if condition is met

  1. #1
    Registered User
    Join Date
    03-17-2013
    Location
    here
    MS-Off Ver
    Excel 2007
    Posts
    8

    Display dropdown list in cell if condition is met

    Hello.

    In Cell A1 I have a dropdown list (created via data validation), with values: ID,DATE,SEC_TYPE.
    In cell A2, I want to display another dropdown list (with date values) when 'DATE' is selected in first drop down list.
    If any other item is selected in first drop down list, allow any value in cell A2.


    How can I do that?

  2. #2
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Display dropdown list in cell if condition is met

    Here is a sample using macros.
    Attached Files Attached Files
    Gary's Student

  3. #3
    Registered User
    Join Date
    03-17-2013
    Location
    here
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Display dropdown list in cell if condition is met

    Thanks!

    2 questions:

    1)What is the purpose of the line
    Please Login or Register  to view this content.
    2)is it possible to avoid of hardcoding the date items in the code (Macro1())? WE already have the dates in data validation of the cell.

  4. #4
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Display dropdown list in cell if condition is met

    The macro responds to changes to any cell in the worksheet, we want it to pay attention to only A1.

    To avoid hard-coding dates, we usually point the data validation to a list of cells. Where is your list??

  5. #5
    Registered User
    Join Date
    03-17-2013
    Location
    here
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Display dropdown list in cell if condition is met

    my list is another sheet

  6. #6
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Display dropdown list in cell if condition is met

    That is cool.

    I have never gotten DV to work off a list on a different sheet.

  7. #7
    Registered User
    Join Date
    03-17-2013
    Location
    here
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Display dropdown list in cell if condition is met

    what do you mean?
    You just select 'List' in data validation, and choose the data in different sheet....

    List is in the same sheet, it's data in different sheet.

  8. #8
    Forum Expert Jakobshavn's Avatar
    Join Date
    08-17-2012
    Location
    Lakehurst, NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    1,970

    Re: Display dropdown list in cell if condition is met

    O.K.

    Here is a version that uses a date list from another sheet (thanks to dredwolf).
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    03-17-2013
    Location
    here
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Display dropdown list in cell if condition is met

    thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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