+ Reply to Thread
Results 1 to 7 of 7

Autocomplete and INDIRECT

  1. #1
    Registered User
    Join Date
    04-10-2014
    Location
    London
    MS-Off Ver
    Excel 2014
    Posts
    5

    Autocomplete and INDIRECT

    Hello everyone!

    So, my issue goes like this:

    In column A, cell A2 I have a dropdown with country names.

    In column B, cell B2 I have a dropdown with city names that works with the INDIRECT function depending on the value in A2.

    Now, what I want is to create another dropdown in column C, cell C2, which will have street names:
    - I need this to be linked with the value in B2 (with INDIRECT again I guess), so that depending on the city selected only this city's streets are available, AND
    - Since there are hundreds of streets I need the dropdown in C2 to work with autocomplete, so when the user starts entering AB for example only streets starting with "AB" appear.

    Any suggestions?


    PS. I have found a code here http://www.contextures.com/xlDataVal10.html but it seems it doesn't work with INDIRECT.

  2. #2
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Autocomplete and INDIRECT

    Hi - if you download the example workbook from that site you link, it has code like this:
    Please Login or Register  to view this content.
    which sets up the combobox, the value of the str variable is what the address for your fill range is, so if you change it to:
    Please Login or Register  to view this content.
    Then it will be linked to whatever address is in Range("A1").

    I don't quite see how you are going to link it to the value in B2, as this will be a city name, presumably you will need some sort of lookup function to work out the address of street names for that city. You need to put this as the str variable name.

  3. #3
    Registered User
    Join Date
    04-10-2014
    Location
    London
    MS-Off Ver
    Excel 2014
    Posts
    5

    Re: Autocomplete and INDIRECT

    Hi ragulduy and thanks for the reply!

    What exactly did you change? The two codes you posted look identical. Am I missing something?

  4. #4
    Forum Expert
    Join Date
    04-22-2013
    Location
    .
    MS-Off Ver
    .
    Posts
    4,418

    Re: Autocomplete and INDIRECT

    Sorry, copying and pasting isn't one of my strong points. In what I was testing I changed:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    04-10-2014
    Location
    London
    MS-Off Ver
    Excel 2014
    Posts
    5

    Re: Autocomplete and INDIRECT

    Thanks ragulduy this worked for me!

  6. #6
    Registered User
    Join Date
    04-10-2014
    Location
    London
    MS-Off Ver
    Excel 2014
    Posts
    5

    Re: Autocomplete and INDIRECT

    Quote Originally Posted by ragulduy View Post
    Sorry, copying and pasting isn't one of my strong points. In what I was testing I changed:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Hello again! How can I modify this if I want to have an autofill drop down list in every row, linking to the relevant cell?

    For example:

    The dropdown in cell C2 should be filled based on B2 (this alone works with str = Range("B2") as per ragulduy)
    The dropdown in cell C3 should be filled based on B3
    The dropdown in cell C4 should be filled based on B4
    The dropdown in cell C5 should be filled based on B5

    etc...

  7. #7
    Registered User
    Join Date
    04-10-2014
    Location
    London
    MS-Off Ver
    Excel 2014
    Posts
    5

    Re: Autocomplete and INDIRECT

    Quote Originally Posted by ragulduy View Post
    Sorry, copying and pasting isn't one of my strong points. In what I was testing I changed:
    Please Login or Register  to view this content.
    to
    Please Login or Register  to view this content.
    Hello again! How can I modify this if I want to have an autofill drop down list in every row, linking to the relevant cell?

    For example:

    The dropdown in cell C2 should be filled based on B2 (this alone works with str = Range("B2") as per ragulduy)
    The dropdown in cell C3 should be filled based on B3
    The dropdown in cell C4 should be filled based on B4
    The dropdown in cell C5 should be filled based on B5

    etc...

+ 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. Sum of indirect sheet names with multiple cells (SUM, INDIRECT,SHEETNAME in cell)
    By a1b2c3d4e5f6g7h8 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-12-2013, 08:42 AM
  2. Replies: 1
    Last Post: 11-16-2008, 02:54 PM
  3. [SOLVED] Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions
    By Andy Wiggins in forum Excel Formulas & Functions
    Replies: 18
    Last Post: 09-06-2005, 04:05 AM
  4. [SOLVED] Allow EXCEL INDIRECT(ADDRESS()) and INDIRECT(RANGE()) functions
    By Mike Barlow in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM
  5. Replies: 0
    Last Post: 01-04-2005, 09:35 PM

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