+ Reply to Thread
Results 1 to 9 of 9

Use Indirect Function on Form Control DropDown List

  1. #1
    Registered User
    Join Date
    07-13-2012
    Location
    Calgary, Alberta, Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Question Use Indirect Function on Form Control DropDown List

    Does anyone know how to use the INDIRECT function for the source of a dropdown list on a Form Control?

    Here is how I can make it work on a regular cell:
    Indirect Function on Regular Cell.JPG

    Here is how I tried to make it work on a form control (didn't work):
    Indirect Function on Form Control.JPG

    Thanks in advance!

  2. #2
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Use Indirect Function on Form Control DropDown List

    An untested theory.

    Create a named range

    Name:= ControlRange
    Refers to:= =EVALUATE(Sheet1!$B$21) (remember to include the sheetname)

    Then in the form control set the input range to =ControlRange

  3. #3
    Registered User
    Join Date
    07-13-2012
    Location
    Calgary, Alberta, Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Use Indirect Function on Form Control DropDown List

    That worked 90%. Thanks!!
    It behaves oddly if you change the dependant cell for the indirect reference.
    See attached example:
    1. Pick "District 20" on the first form control and choose "Field 10" on the second form control. Reference works fine this first time.
    2. Then change the first form control to "District 16". The reference list is still working but the 'reference cell' that the new list is populating doesn't work.

    I think I will need to add the clearing of the second form control 'upon change' of the first one just to re-set it. Otherwise it seems to work fine when the slate is cleared. Thanks!
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    06-08-2012
    Location
    Left the forum!
    MS-Off Ver
    Left the forum!
    Posts
    5,189

    Re: Use Indirect Function on Form Control DropDown List

    It doesn't recognise the change when there is only one option in the 'Field' dropdown, to reset the second one, right click the first and Assign Macro, use the code below.

    Please Login or Register  to view this content.
    BTW, you have a few typos

  5. #5
    Registered User
    Join Date
    07-13-2012
    Location
    Calgary, Alberta, Canada
    MS-Off Ver
    Excel 2010
    Posts
    24

    Re: Use Indirect Function on Form Control DropDown List

    Works perfectly!
    I ended up using [B5] = "" and it clears it which is even better.
    Thanks a million!!!
    p.s. spilling is not my strong suit.

  6. #6
    Registered User
    Join Date
    03-26-2013
    Location
    Boston, MA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Use Indirect Function on Form Control DropDown List

    @jason.b75

    Thanks for this. Would never have figured it out on my own.

    @Oksana

    Thanks for the example files. Would never have figured the answer out on my own.

  7. #7
    Registered User
    Join Date
    09-09-2014
    Location
    Zagvozd, Croatia
    MS-Off Ver
    2013
    Posts
    12

    Unhappy Re: Use Indirect Function on Form Control DropDown List

    What I'm doing wrong? I did everything as explained but still can't get it to work? Any idea?


    00.jpg

  8. #8
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    53,049

    Re: Use Indirect Function on Form Control DropDown List

    Apocalypso Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  9. #9
    Registered User
    Join Date
    09-09-2014
    Location
    Zagvozd, Croatia
    MS-Off Ver
    2013
    Posts
    12

    Re: Use Indirect Function on Form Control DropDown List

    Ah sorry, I didn't noticed there exist such a rule, sorry once again..

    and yes, that's very clever rule I have to admit

    Teo

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

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