+ Reply to Thread
Results 1 to 8 of 8

Automatically select data depending on what's chosen in a drop-down list

  1. #1
    Registered User
    Join Date
    03-24-2011
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office Pro Plus 2010
    Posts
    8

    Automatically select data depending on what's chosen in a drop-down list

    Hi,

    I wasn't 100% sure as to how I should label this problem correctly in English so I hope that my headline isn't too far off.

    Background:
    I'm responsible for our companys MS licenses and to help me keep track of our customers' usage I have a quite extensive workbook, containing one sheet for each customer (built in Excel 2010). Every sheet lists the licenses the corresponding customer is using.
    To make the handling more effective I want to create a drop-down list which automatically selects the correct prize for the product chosen.

    Let's say that I have a table consisting of 5 columns:
    A= Customer name
    B= Amount of licenses (e.g. 2)
    C= License name (is chosen through a drop-down list)
    D= License price (depends on what's being chosen in C)
    E= Total cost (B*D)

    I have created a drop-down list using the data validation tool (guide here for those who are interested: http://www.databison.com/index.php/d...tion-in-excel/). (The table used by the list is located on a different sheet. Let's call it "OtherSheet".)

    Now I want to code it so that when I chose e.g. "ABC 1Proc" from my drop-down list in C2 (cell C2) the price should automatically pop up in D2. I have made this happen with a IF statement referring to the price list on "OtherSheet". However, this causes a problem; let's say that the list consists of 20 different licenses, each having their own price. If I'm going to nestle 20 IF statements in one cell it'll be A LOT of work. Especially if I after 2 months have to add 10 new items.
    It would be great if it was possible to maybe tell the drop-down list to fetch a value from location X and place it in location Y whenever I chose something in it.

    Does anyone know how to solve this problem?
    Is my explanation of what I want to achieve clear enough?

    If you have any further questions, please don't hesitate to ask

    Best regards
    Corm
    Last edited by Cormentia; 03-24-2011 at 11:36 AM.

  2. #2
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Automatically select data depending on what's chosen in a drop-down list

    It sounds like you just need the VLOOKUP() function.

    Have a look at this for help:

    http://www.excelfunctions.net/ExcelVlookup.html

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Automatically select data depending on what's chosen in a drop-down list

    Actually, on second read, I think you are asking how to get data from various sheets into the table - depending on choice made from your DV list.

    You may need the INDIRECT() function to build the VLOOKUP().

    How have you named the individual sheets for each customer - hopefully the same name that appears in your table.

    Here's a link for the INDIRECT() function:

    http://www.excelfunctions.net/Excel-...-Function.html

  4. #4
    Registered User
    Join Date
    03-24-2011
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office Pro Plus 2010
    Posts
    8

    Re: Automatically select data depending on what's chosen in a drop-down list

    Thank you for your answer Cutter. I'll take a look at those links you submitted

    If the links don't solve my problem I'll write an example sheet and submit, so you can see what it looks like.
    Every sheet is named after its customer, e.g. Company AB.

  5. #5
    Registered User
    Join Date
    03-24-2011
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office Pro Plus 2010
    Posts
    8

    Re: Automatically select data depending on what's chosen in a drop-down list

    Thank you very much Cutter. The VLOOKUP solved it.

    Now I have some minor issues to address - then the giant work or cleaning up and replacing all of the existing customer tables xD But it'll be awesome once I'm done!

    Take care and have a nice weekend!
    (Will edit the main post so it's marked as solved.)

  6. #6
    Registered User
    Join Date
    03-24-2011
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office Pro Plus 2010
    Posts
    8

    Re: Automatically select data depending on what's chosen in a drop-down list

    Or not... I remember seeing the option to mark it as "Solved" when I created the thread. But maybe only administrators can do that once it's been posted..

  7. #7
    Registered User
    Join Date
    03-24-2011
    Location
    Stockholm, Sweden
    MS-Off Ver
    Office Pro Plus 2010
    Posts
    8

    Re: Automatically select data depending on what's chosen in a drop-down list

    Found it.

    Thanks again for the help!

  8. #8
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Automatically select data depending on what's chosen in a drop-down list

    You're welcome. I'm glad you got it worked out.

+ 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