+ Reply to Thread
Results 1 to 4 of 4

Combining lookup functions with data validation

Hybrid View

  1. #1
    Registered User
    Join Date
    09-08-2014
    Location
    iran
    MS-Off Ver
    2013
    Posts
    32

    Combining lookup functions with data validation

    Hi
    I have a table like this in A1:B11:

    Name Code
    Fred 3511
    Jack 3512
    Alice 3513
    Lora 3514
    John 3515
    Ann 3516
    Fred 3517
    Lora 3518
    Alice 3519
    Fred 3520

    for example I want to Lookup all codes of Fred by drop down list in data validation.
    Thanks
    Attached Files Attached Files

  2. #2
    Valued Forum Contributor
    Join Date
    05-08-2015
    Location
    Uvalde, TX
    MS-Off Ver
    2010
    Posts
    720

    Re: Combining lookup functions with data validation

    Hi,

    There are several User Defined Functions (UDF) that can do what you are asking.

    The closest I can find was found on:

    http://superuser.com/questions/53623...ultiple-values

    See attached example with the UDF.

    Hope this works for you.

    Cheers
    Attached Files Attached Files

  3. #3
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,423

    Re: Combining lookup functions with data validation

    In I2

    =IFERROR(INDEX(B:B,SMALL(IF($A$2:$A$11=$F$2,ROW($A$2:$A$11),""),ROWS($1:1))),"")

    Enter with Ctrl+Shift+Enter

    This is named range "Codes" and is codes for name in F2

    in column J

    List of names

    Named range "Names"

    F2 is DV drop down

    =List

    =NAmes

    G2 is drop-down

    =List

    =Codes
    Attached Files Attached Files

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Combining lookup functions with data validation

    If you want the results to appear in a single cell like this:

    Data Range
    F
    G
    1
    Name
    Code
    2
    Fred
    3511,3517,3520


    It will require a VBA function.
    Last edited by Tony Valko; 11-27-2016 at 05:09 PM.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] Combining V-Lookup and Transpose Functions
    By GoGoeGo in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-01-2016, 08:53 AM
  2. Combining data validation with lookups
    By jhsiao in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-06-2015, 02:23 AM
  3. [SOLVED] combining if functions and data validation to do calculations
    By petelomax in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 03-19-2014, 09:07 AM
  4. Combining multiple functions>lookup/sum functions
    By mush106 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-22-2013, 07:47 AM
  5. Need help combining an IF statement and lookup, choose, or match functions
    By sixsteps268 in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 05-20-2013, 03:28 PM
  6. Replies: 0
    Last Post: 05-04-2011, 06:26 PM
  7. Combining LOOKUP and COUNTIF functions
    By kate_suzanne in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-22-2006, 02:05 AM

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