+ Reply to Thread
Results 1 to 6 of 6

Lookup using the result of a function as a named range

  1. #1
    Registered User
    Join Date
    01-17-2011
    Location
    Tulsa, OK, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Lookup using the result of a function as a named range

    OK. I have a database of steel section properties (area, width, etc.). All of the properties are located within named ranges. In the database table the first column is the group name range -- wshape. All of the cells to the right are different properties of each section listed in the first column (area, width, depth, weight, etc.) They are all contained in appropriate name ranges based on the property -- e.g. "wshape.a" for area, "wshape.w" for weight.

    My goal is to use a lookup value to lookup a specific property for a specific shape using the result of a function as the named range.

    1 -- I have a column that is data validated with a list = wshape.
    2 -- I have a function that returns a text value which for this example = "wshape"
    3 -- I have this function =CONCATENATE(wshape !the value from line 2 above!,".a") which yields "wshape.a"

    Now I want to use =LOOKUP(!any value from the list in line 1 above!,wshape !from line 2 above!, wshape.a !from line 3 above!)...so =LOOKUP(value,wshape,wshape.a)

    There seems to be a breakdown with excel understanding that the results from the functions in line 2 and line 3 above are named ranges to be referenced in the LOOKUP function.

    Any help is appreciated. I can post some pics or give more detail if that would help.

    Cheers.

  2. #2
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Lookup using the result of a function as a named range

    Hi hinkle.j.s

    Welcome to the forum

    Rather than
    ....post some pics...
    You would do best to post a sample workbook showing your Sheet Layout and perhaps Before and After examples.

    It should clearly illustrate your problem and not contain any sensitive data.

    I take it you have based what you have on AISC Section Properties i.e. Steel Tables.

    What field are you working in?

    Cheers

  3. #3
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup using the result of a function as a named range

    How your various Named ranges are defined will be of critical importance regards the approaches you may adopt in your final formula.

    If the Names are Fixed references [=Database!$A$1:$A100] then you can use INDIRECT to convert the "range strings" to actual range references.
    (note INDIRECT is Volatile - see link in sig. for more info.)

    However, if they Names are dynamic [=OFFSET(Database!$A$1,0,0,COUNTA(Database!$A:$A),1)] you can't and will need to use a workaround method (Evaluate, Choose etc...)

  4. #4
    Registered User
    Join Date
    01-17-2011
    Location
    Tulsa, OK, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Lookup using the result of a function as a named range

    OK. Here is a screenshot of what I'm trying to do. It's a very basic version as I ultimately want to be able to scan the entire database, work in both English and SI units, etc. For the example database the title of each range is in bold and the range begins below that cell for each respective name/color.

    I feel like this should be simple, but I haven't ever been trained in excel and I only recently started using dedicated ranges and lookup functions.

    Marcol, I am a structural engineer.

    DonkeyOte, the named ranges are fixed references.
    Attached Images Attached Images

  5. #5
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Lookup using the result of a function as a named range

    Quote Originally Posted by hinkle.j.s View Post
    DonkeyOte, the named ranges are fixed references.
    In which case try:

    Please Login or Register  to view this content.
    though you might prefer to use an INDEX/MATCH [exact] just incase...

    Please Login or Register  to view this content.
    Quote Originally Posted by hinkle.j.s
    I feel like this should be simple, but I haven't ever been trained in excel and I only recently started using dedicated ranges and lookup functions.
    Give it time... you will find few who have been "trained" in the [dark] arts of Excel ... 99% are self taught - the result of trial and much error.

  6. #6
    Registered User
    Join Date
    01-17-2011
    Location
    Tulsa, OK, USA
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Lookup using the result of a function as a named range

    Thanks, DonkeyOte! It works like I thought it should have all along!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

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