+ Reply to Thread
Results 1 to 10 of 10

vert.search with indirect error.

  1. #1
    Registered User
    Join Date
    04-04-2011
    Location
    Amersfoort
    MS-Off Ver
    Excel 2003
    Posts
    9

    vert.search with indirect error.

    I have no idea what I am doing wrong.
    I am using the following ;

    =VERT.ZOEKEN(Q3;INDIRECT("'"&A6&"'"&"!A1:M90");9;0)

    Where Q3 contains the search criterea, Indirect is the search tab and range ( I assume) where in the sheet A6 contains the name of the respective tab. A1:M90 is the range it should be searching eventually displaying 9.

    What am I doing wrong? Ill appreciate any help and yes, I did go through google sessions, forum browsing etc. etc. There are questions in the same trend but nothing specific. This is my first time working with INDIRECT in a vert. search so I am not that good at it :p.

    Thanks in advance!
    Last edited by MitchK; 09-16-2011 at 08:12 AM.

  2. #2
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: vert.search with indirect error.

    Hello,

    what does the formula return?

    N/A means that the value in Q3 cannot be found in the lookup table
    REF means that the lookup table reference is not valid.

    I don't know how these error values present in the Dutch version of Excel.

    What error do you get?

    Can you post a small sample file for inspection?

    cheers,

  3. #3
    Registered User
    Join Date
    04-04-2011
    Location
    Amersfoort
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vert.search with indirect error.

    It gives me #N/B for most of the lines, there are a few which display 0. I have rebuild the code to the following:


    =VERT.ZOEKEN($Q$2;INDIRECT("'"&A10&"'!A:L");9)

    I have manually tried to ctrl+F in tabs and the exact notation of cell Q3 is avaible in the specific (#N/B which means not avaible) tab.

    it seems to me though that the sells in A which contain 1A for example, a number + letter it does give me the value I am looking for. The cells that contain numbers only do not give back the info.

    if this isnt of any help I can rebuild something and post it here.

    EDIT 1: All which display 0 are tabs with NUMBERXLETTERX name. The value is correct. The format of all tabs is the same only the number of rows can vary (why I need vert. search) I think the problem is something with a tab name only consisting of numbers.

    I really hope anyone knows the solution, as usual I have the feeling its too easy
    Last edited by MitchK; 09-16-2011 at 06:00 AM.

  4. #4
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: vert.search with indirect error.

    In general, the formula is correct. The problem seems to be with the values and whether or not there is actually a match for Q3 (or Q2) in the data table.

    See here for some ideas about what you need to check

    http://www.experts-exchange.com/Soft...-Not-Work.html

    Or, post a sample of your file for inspection.

    cheers,

  5. #5
    Registered User
    Join Date
    04-04-2011
    Location
    Amersfoort
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vert.search with indirect error.

    Here , hope its helpfull. Thanks for your continued help and effort! greatly appreciated.
    Attached Files Attached Files
    Last edited by MitchK; 09-16-2011 at 06:23 AM.

  6. #6
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: vert.search with indirect error.

    Don't use whole column reference with Vlookup (or VERT.ZOEKEN )

    Limit the lookup table to only the populated rows.

    The rows are not the problem if you get N/A.

    Post the data sample.

  7. #7
    Registered User
    Join Date
    04-04-2011
    Location
    Amersfoort
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vert.search with indirect error.

    Hmm, I deleted the post before, I was saying that I changed the range to start at B , it doesnt give me the #N/B errors anymore so thus seems to me as an improvement :p. Now it just gives me 0's.
    Data sample is in the post above! messed a bit up with editing it :p

  8. #8
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: vert.search with indirect error.

    OK.

    In the English Excel version, the formula in your spreadsheet is this

    =VLOOKUP($A$2,INDIRECT("'"&A5&"'!B:L"),3)

    The lookup range starts in column B and you return the third column (of the lookup range!!!) = column D for a match. But column D is empty in the sheet with the data. The empty cell will be returned as a 0 value.

    So, what you really need to return the value in column C of the data table is

    =VLOOKUP($A$2,INDIRECT("'"&A5&"'!B:L"),2,FALSE)

    Also, if you want to return an exact match, make sure to include the fourth parameter of the Vlookup function and set it to False or 0. If you don't do that, Excel will return the value of the next smallest match in a table that is sorted ascending (small to large) in column B. If the table is not sorted, then the results will appear, uhmm, funny.

    The formula in row 12 returns the Ref! error, because there is no sheet called 9879A in the workbook.

    See attached. When you open it, the workbook will again show the Dutch version of the functions and the semicolon instead of the comma as the delimiter in the formula.

    Does that help?

    cheers,
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    04-04-2011
    Location
    Amersfoort
    MS-Off Ver
    Excel 2003
    Posts
    9

    Re: vert.search with indirect error.

    Quote Originally Posted by teylyn View Post
    OK.

    In the English Excel version, the formula in your spreadsheet is this

    =VLOOKUP($A$2,INDIRECT("'"&A5&"'!B:L"),3)

    The lookup range starts in column B and you return the third column (of the lookup range!!!) = column D for a match. But column D is empty in the sheet with the data. The empty cell will be returned as a 0 value.

    So, what you really need to return the value in column C of the data table is

    =VLOOKUP($A$2,INDIRECT("'"&A5&"'!B:L"),2,FALSE)

    Also, if you want to return an exact match, make sure to include the fourth parameter of the Vlookup function and set it to False or 0. If you don't do that, Excel will return the value of the next smallest match in a table that is sorted ascending (small to large) in column B. If the table is not sorted, then the results will appear, uhmm, funny.

    The formula in row 12 returns the Ref! error, because there is no sheet called 9879A in the workbook.

    See attached. When you open it, the workbook will again show the Dutch version of the functions and the semicolon instead of the comma as the delimiter in the formula.

    Does that help?

    cheers,
    haha, yea it was. Dont know why I did not come up with that, I am however wondering how it wouldnt work when the range goes from A:L for example. With only A1 containing data rest of the column empty. Nevertheless thanks for your time and effort, +rep

  10. #10
    Forum Expert teylyn's Avatar
    Join Date
    10-28-2008
    Location
    New Zealand
    MS-Off Ver
    Excel 365 Insider Fast
    Posts
    11,372

    Re: vert.search with indirect error.

    Mitch, you need to understand that the lookup range in Vlookup is anchored in the first column of the lookup table.

    vlookup(A1,B:L,2,0)

    will return the value of the second column in the table that starts in column B. So the value returned will be from column C.

    vlookup(A1,B:L,3,0)

    will return the value of the third column in the table that starts in column B. So the value returned will be from column D.

+ 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