+ Reply to Thread
Results 1 to 5 of 5

Display result based on Drop Down box list choice

  1. #1
    Registered User
    Join Date
    10-15-2015
    Location
    Tweed, Ontario
    MS-Off Ver
    2007
    Posts
    11

    Display result based on Drop Down box list choice

    Hi there. I have two worksheets within a doc. I'm drawing a list of dropdown sizes from the master sheet "LUMBER". And based on the item chosen in the drop down, i want the cell beside it (Cell K) to automatically populate the value that corresponds to the size, as shown on the chart in worksheet "LUMBER".

    Attachment 425086


    Currently I'm doing this with a nested IF formula. But, I'm going to soon have over 50 sizes with corresponding values in the chart, so I don't think a nested IF forumula is the best way to do this. Is there a better way? Thank you!

    The formula in cell K of sheet "PALLET" is: =IF(J3=LUMBER!$A$2,LUMBER!$B$2,IF(J3=LUMBER!$A$3,LUMBER!$B$3,IF(J3=LUMBER!$A$6,LUMBER!$B$6,
    IF(J3=LUMBER!$A$7,LUMBER!$B$7,IF(J3=LUMBER!$A$8,LUMBER!$B$8,IF(J3=LUMBER!$A$9,LUMBER!$B$9,
    IF(J3=LUMBER!$A$4,LUMBER!$B$4,IF(J3=LUMBER!$A$5,LUMBER!$B$5,IF(J3=LUMBER!$A$10,LUMBER!$B$10,
    IF(J3=LUMBER!$A$11,LUMBER!$B$11,IF(J3=LUMBER!$A$12,LUMBER!$B$12,IF(J3=LUMBER!$A$13,LUMBER!$B$13,
    IF(J3=LUMBER!$A$14,LUMBER!$B$14,IF(J3=LUMBER!$A$15,LUMBER!$B$15,0))))))))))))))



    Note: I originally posted this thread under the following title "Function or formula for this"
    http://www.excelforum.com/excel-form...-for-this.html
    Attached Images Attached Images
    Attached Files Attached Files
    Last edited by SHANBURR; 10-15-2015 at 03:25 PM. Reason: accidentally posted two images

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,939

    Re: Function, or Formula for this?

    Hi, welcome to the forum

    Please take a moment to read the forum rules and then amend your thread title to something descriptive of your problem - not what you think the answer might be. (think google search terms?). Once you have done this please send me a PM and I will remove this request. (Also, include a link to your thread - copy from the address bar)

    Many members search our previous posts, and thread titles play a big part of the search. I doubt anybody would do a search based on your title?

    To change a Title on your post, click EDIT POST then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.

    (note: this change is not optional )


    Also, Please upload a sample of your workbook, not a picture of your data. Pictures are pretty much impossible to edit, and no-one wants to re-type your data for you
    Also, not all members can upload picture files (Company firewalls and stuff) - and, depending on what browser is being used, some pics dont even show up on the forum

    Your workbook should show a small desensitized example of the data you are working with and a manual mockup of the expected results.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    10-15-2015
    Location
    Tweed, Ontario
    MS-Off Ver
    2007
    Posts
    11

    Re: Display result based on Drop Down box list choice

    Thanks for the tips Ford, done!
    Shan

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Display result based on Drop Down box list choice

    You want to use VLOOKUP
    =VLOOKUP(reference, Array to look at, column to return, False (meaning exact matches only)

    First I selected your lumber table Lumber!A2:B15 and made it a defined name (Formula Tab>Define Name) called lumber

    Then in K3 for example

    =VLOOKUP(J3, lumber, 2, FALSE)

    To make it return 0 when there is no entry or match

    =IFERROR(VLOOKUP(J3, lumber, 2, FALSE), 0)
    Attached Files Attached Files
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  5. #5
    Registered User
    Join Date
    10-15-2015
    Location
    Tweed, Ontario
    MS-Off Ver
    2007
    Posts
    11

    Re: Display result based on Drop Down box list choice

    Absolutely brilliant! Thank you
    I think I will be using VLOOKUP alot from now on...

+ 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] Need a function since formula is very big (Mega formula)
    By sandiptemkar in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 03-02-2014, 08:20 AM
  2. Replies: 1
    Last Post: 02-06-2014, 09:22 AM
  3. vlookup formula and function to combined with another formula
    By Miss Niki in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-09-2014, 12:03 PM
  4. Formula Creation: Using List Function + Subtraction Function
    By HelpMe! in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 04-09-2013, 04:52 PM
  5. Replies: 0
    Last Post: 01-19-2013, 01:35 PM
  6. Need Excel formula in Macro using Subtotal formula with If function
    By mbnewton1 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-16-2013, 03:00 PM
  7. [SOLVED] I want to create a formula in one sheet, that will function as a formula in other sheets
    By johnw993 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-06-2013, 07:07 PM
  8. IF function formula
    By MGW-mac in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-19-2008, 02:46 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