+ Reply to Thread
Results 1 to 5 of 5

Indirect Function with Vlookup not functioning as expected.

  1. #1
    Registered User
    Join Date
    02-09-2014
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    8

    Indirect Function with Vlookup not functioning as expected.

    I am using the following vlookup function in a very large Excel spreadsheet:

    =VLOOKUP($B1744,INDIRECT($D$2&"Dealer2'!$A$5:$BF$498"),$H$2,0)

    Please note Dealer2 within the function. If I use Dealer1 or Dealer3, for example, the correct answer appears. This same function is used for Dealer1 through Dealer20.

    Using the function as shown above with Dealer2, it returns a #REF! error.

    I think this is because, at this time, there is not a Dealer2.

    Is it possible to have it return something such as 0 or - if there is currently not a Dealer2, so the totals will be correct.

  2. #2
    Forum Expert
    Join Date
    12-11-2011
    Location
    Netherlands
    MS-Off Ver
    office 365
    Posts
    3,256

    Re: Indirect Function with Vlookup not functioning as expected.

    =iferror(VLOOKUP($B1744,INDIRECT($D$2&"Dealer2'!$A$5:$BF$498"),$H$2,0),"there is currently not such a Dealer")
    Willem
    English is not my native language sorry for errors
    Please correct me if I'm completely wrong

  3. #3
    Registered User
    Join Date
    02-09-2014
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Indirect Function with Vlookup not functioning as expected.

    This works, however, it produces a error when giving the totals. The error is #VALUE!

  4. #4
    Registered User
    Join Date
    02-09-2014
    Location
    Georgia
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Indirect Function with Vlookup not functioning as expected.

    If I use the following, it gives the correct total but, if there is a Dealer2 will it produce the correct answer or still give the 0 response?

    =IFERROR(VLOOKUP($B1720,INDIRECT($D$2&"Dealer2'!$A$5:$BF$498"),$H$2,0),0)

  5. #5
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Indirect Function with Vlookup not functioning as expected.

    whats in d2 and are you sure the worksheet with the "dealer2" in its name is exactly that
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. IF function with INDIRECT VLOOKUP?
    By Environment in forum Excel General
    Replies: 5
    Last Post: 02-13-2012, 11:27 AM
  2. [SOLVED] Indirect or Vlookup Function
    By Justin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 10:05 AM
  3. [SOLVED] Indirect or Vlookup Function
    By Biff in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 07:05 AM
  4. [SOLVED] Indirect or Vlookup Function
    By Biff in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2005, 06:05 AM
  5. Indirect or Vlookup Function
    By Justin in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 12:05 AM

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