+ Reply to Thread
Results 1 to 5 of 5

Looking up a range name and using it another formula

  1. #1
    Registered User
    Join Date
    10-20-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    0

    Looking up a range name and using it another formula

    Can I use the results of a VLookup to specify the range of cells to use in another formula? I have tried by creating named ranges and using a VLookup table to lookup the name of the range to use. The VLookup works fine but I when I nest the VLookup in another formula it gives #VALUE!
    Last edited by LizN; 10-21-2012 at 03:26 AM.

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    25,412

    Re: Looking up a range name and using it another formula

    If the VLOOKUP formula returns the named range, then you can use it by wrapping it in an INDIRECT function, like this:

    =VLOOKUP(A1,INDIRECT(Vlookup_formula),2,0)

    Hope this helps.

    Pete

  3. #3
    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
    53,048

    Re: Looking up a range name and using it another formula

    perhaps do some research on indirect() this will allow you to build up a range using text, range names and cell references.

    if you still have a problem, upload a sample workbook for us to look at?

    To Attach a File:

    1. Click on Go Advanced
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    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

  4. #4
    Registered User
    Join Date
    10-20-2012
    Location
    New Zealand
    MS-Off Ver
    Excel 2010
    Posts
    0

    Re: Looking up a range name and using it another formula

    Thanks Pete and FDibbins, indirect did the trick
    thanks for the fast responses

  5. #5
    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
    53,048

    Re: Looking up a range name and using it another formula

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. I'll do that for you now but please keep in mind for your future threads that Rule #9 requires you to do that yourself. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

+ 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