+ Reply to Thread
Results 1 to 8 of 8

Drop-Down List

Hybrid View

ramblinpaul Drop-Down List 03-31-2007, 08:04 PM
VBA Noob Hi, Maybe a vlookup ... 04-01-2007, 04:32 AM
ramblinpaul I can't get a VLOOKUP to do... 04-03-2007, 08:05 PM
Leith Ross Hello Ramblinpaul, Could... 04-03-2007, 10:24 PM
Paul Depends on what exactly... 04-03-2007, 10:49 PM
  1. #1
    Registered User
    Join Date
    03-31-2007
    Location
    Toronto, Canada
    Posts
    4

    Drop-Down List

    I'm using drop-downs to choose from a list of location names.

    When a location is selected I would like to have cells below the drop-down to display the locations corresponding address which is stored/displayed in 6 or 7 cells.

    What do I need to do?

    I hope that make sense. Does anyone have an answer/suggestion to my question?

    Thanks!

    Paul

  2. #2
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    Maybe a vlookup

    http://www.contextures.com/xlFunctions02.html


    VBA Noob
    _________________________________________


    Credo Elvem ipsum etian vivere
    _________________________________________
    A message for cross posters

    Please remember to wrap code.

    Forum Rules

    Please add to your signature if you found this link helpful. Excel links !!!

  3. #3
    Registered User
    Join Date
    03-31-2007
    Location
    Toronto, Canada
    Posts
    4
    Quote Originally Posted by VBA Noob
    I can't get a VLOOKUP to do it, either. It will only display 1 cell of the table (address), not the entire range which stores the full address.

  4. #4
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello Ramblinpaul,

    Could you post a brief worksheet or code description of what you want to do ? It would help to better understand your needs.

    Sincerely,
    Leith Ross

  5. #5
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887
    Depends on what exactly you're trying to do, but consider this:

    If your drop-down is in cell A1 and it is linked to cell A1, you can reference that value in one VLOOKUP going down the column to get the rest of the columns from your data sheet. For example:

    A1 = your dropdown list
    In A2 through as many rows as there are columns in your data lookup sheet, use the formula:

    =VLOOKUP($A$1,Sheet2!$A$1:$F$10,ROW(),FALSE)

    This will lookup the value in A1, match it against your data lookup range, then return the column from that range that matches the row your formula is in. Might not make sense the way I'm explaining it, but it does return multiple values from one value in the drop-down cell.

  6. #6
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    I opted for an HLOOKUP function, because I assumed the data would be stored with a location name, and the corresponding addresses underneath.

    I used this formula in cell A2:A10 (obviously your range will vary)

    =IF(ISERROR(HLOOKUP(A$1,Locations!$A$1:$H$6,ROW(),FALSE)),"",HLOOKUP(A$1,Locations!$A$1:$H$6,ROW(),FALSE))

+ 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