+ Reply to Thread
Results 1 to 6 of 6

VLOOKUP problem with N/A#

  1. #1
    Forum Contributor
    Join Date
    02-14-2004
    Posts
    131

    VLOOKUP problem with N/A#

    When using formula =VLOOKUP(A2,JSRMP!$A$2:$C$213,2,FALSE) THE result returned is a N/A#. (Column G of the RMPXWS worksheet) Yet the formula returns the correct value further down the spreadsheet. Funny thing is on some of the N/A# values there should not be a N/A# because the referenced item is in the JSRMP worksheet. I've attached the spreadsheet and I'd appreciate knowing what to do tho correct this. Thanks.
    Last edited by nander; 05-25-2007 at 08:56 AM.

  2. #2
    Forum Expert
    Join Date
    01-12-2007
    Location
    New Jersey
    Posts
    2,127
    from what I can see, some of the lookup values dont exist in your lookup range.

  3. #3
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Your data in the JSRMP sheet in col A which do not contain alpha characters are text, while in the other sheet they are numbers
    This gives the error.
    To correct easily type 0 in an empty cell - select the cell and copy
    select all column A in JSRMP right-click - Paste special and in "Operation " section check "add" - then click OK

  4. #4
    Forum Contributor
    Join Date
    02-14-2004
    Posts
    131
    AuthurB you hit the nail on the head, thank you very much. But would you tell me please why this worked? I've never used that technique before. Also is there a way to get the N/A# to go blank?

  5. #5
    Forum Contributor
    Join Date
    02-20-2007
    MS-Off Ver
    2003 & 2007
    Posts
    299
    To have the N/A# show blank you need to use an IF statement

    =if(isna(VLOOKUP(A2,JSRMP!$A$2:$C$213,2,FALSE)),"",VLOOKUP(A2,JSRMP!$A$2:$C$213,2,FALSE))

    Also, a common cause for this error is that one of the values is a number, and the other is text. If the lookup table contains numbers, and the value to look up is text, try this

    =VLOOKUP(--A2,JSRMP!$A$2:$C$213,2,FALSE)

    If the lookup table contains text, and the value to look up is numeric, try

    =VLOOKUP((A2&""),JSRMP!$A$2:$C$213,2,FALSE)

    If you don't know you could always try.
    =if(isna(VLOOKUP(--A2,JSRMP!$A$2:$C$213,2,FALSE)),VLOOKUP((A2&""),JSRMP!$A$2:$C$213,2,FALSE),VLOOKUP(--A2,JSRMP!$A$2:$C$213,2,FALSE))

  6. #6
    Forum Expert
    Join Date
    12-23-2006
    Location
    germany
    MS-Off Ver
    XL2003 / 2007 / 2010
    Posts
    6,326
    Glad to help
    erock's solution will be the easiest if you import new values without knowing if they are nrs or text

    Cheers

+ 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