+ Reply to Thread
Results 1 to 5 of 5

Vlookup with indirect error

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Vlookup with indirect error

    Hi All,

    I have this formula and it works in one case, but not in the other. I believe i know why but cannot seem to fix it. here is my first formula:

    =IF($A$3="","",VLOOKUP($A$3&$BB2,INDIRECT("Pts!$C$2:$L$"&Pts!$M$1),2,FALSE))

    It is working perfectly, i am looking up a value on another sheet, in this case Pts, and only looking in the first so many rows based on Pts!$M$1. Then next formula i am having a problem, i believe it is because my sheet is not named with one word, it is two. Here is the formula:

    =IF($A$3="","",VLOOKUP($A$3&$BM2,INDIRECT("Valid DL!$C$2:$L$"&Valid DL!$M$1),2,FALSE))

    I am getting a #name error. I believe it is getting hung up on the bold statement, Valid DL!$M$1, because i cannot have a two word name of a sheet. Although i am not sure if that is the case. Any help would be greatly appretiated. Also i cannot change the name of my sheet because of other stipulations, many macros have that sheet name and i am afraid it would take a little while to change all the macros to a new sheet name. Thanks

  2. #2
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Vlookup with indirect error

    Try:

    Formula: copy to clipboard
    =IF($A$3="","",VLOOKUP($A$3&$BM2,INDIRECT("'Valid DL'!$C$2:$L$"&'Valid DL'!$M$1),2,FALSE))


    Notice the 4 '
    Sincerely
    S?ren Larsen

    "Give a man a fish, and you'll feed him for a day. Give a man a fishing rod, and he'll steal your yacht!"

  3. #3
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Vlookup with indirect error

    Soren,

    That is giving me a #REF! error now.

  4. #4
    Forum Contributor
    Join Date
    08-22-2011
    Location
    Texas, United States
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    516

    Re: Vlookup with indirect error

    Soren,

    Thanks for attempting to help me. I just in fact changed my sheet name to ValidDL and changed it in all of my modules to that as well. I just couldn't keep messing with it. I figured by this time it was probably faster to just change the name, and that did it. Thanks again.

  5. #5
    Valued Forum Contributor
    Join Date
    03-16-2012
    Location
    Aarhus, Denmark
    MS-Off Ver
    Excel 2007
    Posts
    992

    Re: Vlookup with indirect error

    I'm glad you got it figured out!

+ 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