+ Reply to Thread
Results 1 to 10 of 10

VLOOKUP reference error

  1. #1
    Registered User
    Join Date
    03-05-2008
    Posts
    30

    VLOOKUP reference error

    Hi all. This is probably very simple to all you experts !

    I have a spreadsheet that returns a value from a VLOOKUP. However, sometimes this will reture a #REF error because there is no value. How can i get it to show 0 if there is no value, in order for the SUM calculation to not error.

    THanks,

    Greg
    Last edited by gvb; 06-01-2009 at 02:58 PM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP reference error

    Are you sure it is the REF# error and not the #N/A error?

    If it is the REF error, then something else is wrong, like referencing outside the range....

    If it is #N/A, then something like

    =If(isna(Vlookup(...)),0,Vlookup(....))
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    03-05-2008
    Posts
    30

    Re: VLOOKUP reference error

    You are correct. It is referencing outside the range because there is no value, which in turn creates no line in the pivot table. The problem is because my column references from three different pivot tables, two of which have the value and therefore have the specific line in the table. The one pivot table doesnt have the value, and thus references outside the range.

    Hope that is clearer and feel free to suggest other ideas instead of returning a 0 value if there is a #REF.

    Thanks for the quick reply.

    greg

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP reference error

    Replace Isna() with IsError()

  5. #5
    Registered User
    Join Date
    03-05-2008
    Posts
    30

    Re: VLOOKUP reference error

    Almost there. When i use that code is returns FALSE. Is there anyway to make it return the number 0 or leave it blank. This is going to be on a report, and a big FALSE will just stick out.

    Thanks
    greg

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP reference error

    Make sure your brackets are all there and in the correct places...

    if the vlookup returns an error, this should return a 0....

    =If(iserror(Vlookup(...)),0,Vlookup(....))

  7. #7
    Registered User
    Join Date
    03-05-2008
    Posts
    30

    Re: VLOOKUP reference error

    Perfect.

    Thanks a bunch again.

    greg

  8. #8
    Registered User
    Join Date
    03-05-2008
    Posts
    30

    Re: VLOOKUP reference error

    How do i mark it solved

  9. #9
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: VLOOKUP reference error

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

  10. #10
    Registered User
    Join Date
    03-05-2008
    Posts
    30

    Re: VLOOKUP reference error

    yeah i saw your signature.

+ 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