+ Reply to Thread
Results 1 to 3 of 3

What is the correct syntax for using VLOOKUP with INDIRECT ?

Hybrid View

  1. #1
    Registered User
    Join Date
    04-21-2005
    Posts
    4

    Question What is the correct syntax for using VLOOKUP with INDIRECT ?

    I am using the following inputs for a combined VLOOKUP and INDIRECT function. I think I have put everything necessary but I still get the #REF! error. I think I have the correct syntax which I found on this forum, but I may be missing something.

    I am trying to use inputs from various cells and fixed text to generate a path and array reference in another file for the VLOOKUP function to use.

    VLOOKUP(A3,INDIRECT("'"&"I:\Finance\2004\IT DEPARTMENT\IT PROJECTS TRACKING\1 - Individual files\"&B78&"."&B79&"."&B80&"\["&C1&" "&B78&"."&B79&"."&B80&".xls]Template"&"'"&"!$A$1:$ZZ$200",TRUE),5,FALSE)

    It will be great if you could tell me where I may be going wrong so that I can use this combination to make my spreadsheet easier to use and modify.

    Thanking you in advance for any help you may give me.

  2. #2
    Forum Expert swatsp0p's Avatar
    Join Date
    10-07-2004
    Location
    Kentucky, USA
    MS-Off Ver
    Excel 2010
    Posts
    1,545
    From just a quick look at your formula, it appears you may have your quote marks in the wrong places, e.g.

    "&B78&"."&B79&"."&B80&"\

    should maybe be:

    &_"B78"_ &_ "."_&_"B79"_&_ "."_&_"B80"_\

    I added underscores for demonstration purposes only to show the groupings within each set of quoted items.

    I am guessing that you are trying to concatenate the contents of several cells to form the name of a directory. In this case the '&' needs to be outside of the quotes.

    HTH

    Bruce
    Bruce
    The older I get, the better I used to be.
    USA

  3. #3
    Registered User
    Join Date
    04-21-2005
    Posts
    4

    Question Quotes seem ok on double check. Even CONCATENATE does not work ?

    Hi Bruce,

    Thank you for your reply.

    I double checked the whole expression from the beginning and it seems ok. You need to see the whole expression and not a section, especially since the quotes also enclose single quotes as needed etc.

    Another thought,

    I am able to concatenate the entire path correctly using the CONCATENATE function but when i try to nest it within the other 2 functions, I get the #REF! error.

    Each function seems to work on its own but not in conjunction with each other.

    Also,
    On the Microsoft site, I read that the INDIRECT function only works if the file being referred to is open. I tried this but even this does not work.

    Help

    neil

+ 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