+ Reply to Thread
Results 1 to 4 of 4

Display Combo Box if a condition is met.

  1. #1
    Registered User
    Join Date
    09-02-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Display Combo Box if a condition is met.

    Hi All.

    Here is the scenario:

    If a value in column B1 is greater than the one in column A1 (e.g.: A1=1, B1=2), I want excel to display Combo Box in column C1.
    Similarly, if a value in Column B1 is less than the one in column A1 (A1=2, B1=1), I don't want excel to show Combo Box.

    Any help appreciated.

  2. #2
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: Display Combo Box if a condition is met.

    JanRaven,

    The attached excel file puts a combo box in column C with the values in A and B if A is less than B. It is setup to update automatically anytime the values in Columns A or B change.

    You can see if that works for you. To get to the code, open the Workbook, hit "<Alt> <F11>" and the code is under "Sheet1".

    Thanks,

    Daniel
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    09-02-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Display Combo Box if a condition is met.

    Thank you for your hard work. Great job! But actually what I need is for combo box not to show the values form columns A and B, but "descriptions". Please see attachment.
    Attached Files Attached Files

  4. #4
    Forum Contributor
    Join Date
    10-19-2012
    Location
    Omaha, Nebraska USA
    MS-Off Ver
    Excel 2010
    Posts
    249

    Re: Display Combo Box if a condition is met.

    Hi,

    I modified the file, but since I am using Excel 2003 rather than Excel 2010, it is limited in pointing at a range on another sheet. I put the "Descriptions" list on sheet 1 so I can point to it, but in Excel 2010, you can point to that list on Sheet 2 as you have it shown on your example.

    I'm also not using combo boxes, but I'm using the "Data --> Validation" feature to put a list in the cell and then shut it off if A is greater than B.

    When converting the file back to an "xlsm" file in Excel 2010 format, you can modify the following line in the code to point to the Descriptions list on a different sheet

    Please Login or Register  to view this content.
    I have reattached the file with the code modified to provide a Descriptions list.

    Thanks,

    Daniel
    Attached Files Attached Files

+ 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