+ Reply to Thread
Results 1 to 3 of 3

Cell Value Based on Selection from Named Range

Hybrid View

  1. #1
    Registered User
    Join Date
    10-25-2012
    Location
    Ne/Ia
    MS-Off Ver
    office 2016
    Posts
    52

    Cell Value Based on Selection from Named Range

    I used another program with user programmable aspects to do the same thing i want here. I have a named range "BarSize" that contains a column
    with #3, #4 etc... I used Data Validation to Create a dropdown list. I need another cell to equal the "Weight" of the barsize selected. the code i
    used is similar to:
    IF Value.("Q12")="#3" then
    	Value.("R12")=0.375
    ElseIf Value.("Q12")="#4" then
    	Value.("R12")=0.668
    ElseIf Value.("Q12")="#5" then
    	Value.("R12")=1.043
    ElseIf Value.("Q12")="#6" then
    	Value.("R12")=1.502
    ElseIf Value.("Q12")="#7" then
    	Value.("R12")=2.044
    ElseIf Value.("Q12")="#8" then
    	Value.("R12")=2.670
    ElseIf Value.("Q12")="#9" then
    	Value.("R12")=3.400
    ElseIf Value.("Q12")="#10" then
    	Value.("R12")=4.303
    ElseIf Value.("Q12")="#11" then
    	Value.("R12")=5.313
    ElseIf Value.("Q12")="#14" then
    	Value.("R12")=7.650
    ElseIf Value.("Q12")="#18" then
    	Value.("R12")=13.600
    I just don't know how to make it work in Excel 2010. I'd appreciate any help!

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Cell Value Based on Selection from Named Range

    I do not see a named range in the code.
    The attached example uses a formula that will get the result you want and does not use code.
    You just need to set up a table to get the results you want.
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    10-25-2012
    Location
    Ne/Ia
    MS-Off Ver
    office 2016
    Posts
    52

    Re: Cell Value Based on Selection from Named Range

    Dave,
    Thank you! that works beter tan named range, i can use that in more than 1 place!

+ 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