+ Reply to Thread
Results 1 to 7 of 7

Drop Down List with an IF function?

  1. #1
    Registered User
    Join Date
    11-01-2016
    Location
    Concord
    MS-Off Ver
    2007
    Posts
    4

    Drop Down List with an IF function?

    Hello,

    I am having trouble trying to figure this out. Here is what I am trying to do:
    I have made a drop down list of 5 names. These 5 people are associated with a certain number. When I choose a name from the drop down list, I need the cell next to it to populate their assigned number.

    I have tried the IF function but it seems I have too many criteria for this...

    Please help me! Thank you

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

    Re: Drop Down List with an IF function?

    Try this...

    Create the 2 column table in D1:E5.

    Data Range
    A
    B
    C
    D
    E
    1
    Dinka
    17
    Plinka
    5
    2
    Blinka
    12
    3
    Trinka
    2
    4
    Dinka
    17
    5
    Winka
    44
    6
    ------
    ------
    ------
    ------
    ------


    This formula entered in B1:

    =VLOOKUP(A1,D1:E5,2,0)
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert José Augusto's Avatar
    Join Date
    10-29-2014
    Location
    Portugal
    MS-Off Ver
    2013-2016
    Posts
    3,329

    Re: Drop Down List with an IF function?

    Hi
    Try this
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Where C3 is your dropdown cell, k2:l6 are the table with names and codes

    See the file
    Attached Files Attached Files

  4. #4
    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,206

    Re: Drop Down List with an IF function?

    Put names in A1:A5

    Numbers in B1:B5

    DV in C1

    in D1

    =VLOOKUP(C1,$A1:$B5,2,0)

  5. #5
    Registered User
    Join Date
    11-01-2016
    Location
    Concord
    MS-Off Ver
    2007
    Posts
    4

    Re: Drop Down List with an IF function?

    That worked!! Thank you so much!

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

    Re: Drop Down List with an IF function?

    Although the VLOOKUP formula is the better choice here's how you would construct the nested IF formula...

    =IF(A1="Plinka",5,IF(A1="Blinka",12,IF(A1="Trinka",2,IF(A1="Dinka",17,IF(A1="Winka",44,"")))))

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

    Re: Drop Down List with an IF function?

    You're welcome. Thanks for the feedback!

+ 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. Drop down list Sum Function
    By Tankerblade in forum Excel General
    Replies: 8
    Last Post: 06-02-2016, 07:01 AM
  2. [SOLVED] IF function with drop-down list
    By hobo1999 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-29-2015, 02:30 PM
  3. Drop Down List Function
    By salmanjan in forum Excel Formulas & Functions
    Replies: 16
    Last Post: 07-23-2014, 08:05 PM
  4. Drop down list dependant on IF function
    By Julian Philips in forum Excel General
    Replies: 1
    Last Post: 03-18-2013, 09:11 AM
  5. [SOLVED] sumif function using a drop list
    By wayneg in forum Excel General
    Replies: 2
    Last Post: 11-28-2012, 12:28 PM
  6. [SOLVED] IF Function Return Drop-Down List
    By bRob in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-19-2012, 05:32 PM
  7. IF function and a drop down list validation.
    By Stevie-B in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-15-2008, 02:17 PM

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