Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Sep 2002
    Location
    Green Bay, Wisconsin, USA
    Posts
    17
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Variable range name in a function (Excel 2003)

    Is it possible to insert a variable range name in a function. For example, the user selects a range name from a drop down list in a combo box -- mfgr1, mfgr2, mfgr3, etc. Each range name refers to a table of constants. I want to use Vlookup to select constants from the table. If the user selected "mfgr2", I want to stuff "mfgr2" into the formula as follows: Vlookup(model6, mfgr2,5,false). In other words, I want the 2nd argument of the function to be the VALUE of the referenced cell, not the cell itself.

    If this is not possible, is there another way to do the following: The user selects a "manufacturer" and a "model" from drop down lists. (I have that part of the sheet figured out.) The sheet then makes calculations based upon constants that are specific to a given manufacturer and model. My problem is accessing the constants from the appropriate table.

    Any help would be appreciated.

  2. #2
    Uranium Lounger
    Join Date
    Jan 2001
    Location
    South Carolina, USA
    Posts
    7,295
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Variable range name in a function (Excel 2003)

    If cell A1 is the cell connected with the combo box, then try:

    <code>
    Vlookup(model6,INDIRECT(A1),5,false)
    </code>
    Legare Coleman

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •