+ Reply to Thread
Results 1 to 6 of 6

drop down list formula's

  1. #1
    Registered User
    Join Date
    07-31-2007
    Posts
    19

    drop down list formula's

    Hi,

    I am having a little trouble finding out how to link two columns for a drop down list.

    I have Column A1 - A20 populated which links to a drop down list in cell C1. I want cell C2 to be populated with the contents of the corresponding B column.

    For example, if in the drop down list, Cell A2 is selected, i want cell C2 to be populated with the contents of B2. If A5 is selected it should be B5.

    I have tried using a number of IF commands, (=IF(C1=A1,B1,IF(C1=A2, B2, IF(C1=A3,b3... ETC...

    But this can only handle up to A8 (8 IF commands) before the formula stops working.

    Does anyone know of a way that i can link cells A and B to show that whichever number A is used, the correct B cell will be displayed?

    Thanks

  2. #2
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Hello davittp,

    Welcome to the forum

    Try this in D1

    =VLOOKUP(C1,A1:B20,2,FALSE)

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


    Blessed are those who can give without remembering and take without forgetting

    If you are happy with the help you have received, please click the <--- STAR icon on the left - Thanks.

    Click here >>> Top Excel links for beginners to Experts

    Forum Rules >>>Please don't forget to read these

  3. #3
    Registered User
    Join Date
    07-31-2007
    Posts
    19

    Thanks

    Thanks for the code.

    this works perfectly.

    Could you advise on how this works? or what each part means?

    Many Thanks

  4. #4
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    Quote Originally Posted by davittp
    Thanks for the code.

    this works perfectly.

    Could you advise on how this works? or what each part means?

    Many Thanks
    It's a VLOOKUP function, searches for a value in the first column of a table array and returns a value in the same row from another column in the table array.

    C2 is the cell you wish to look up, A1:B20 is the range to find it in, 2 is the column where the information you want returned is found, FALSE is an exact match.

    Take a look under Excel Help and type in VLOOKUP more explaination there.

  5. #5
    Registered User
    Join Date
    07-31-2007
    Posts
    19
    Thanks again OldChippy.

    Much appreciated.

    P

  6. #6
    Forum Expert oldchippy's Avatar
    Join Date
    02-14-2005
    Location
    Worcester, UK
    MS-Off Ver
    Excel 2007 (Home)
    Posts
    7,097
    No problem - 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)

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