+ Reply to Thread
Results 1 to 4 of 4

Replace #N/A of a Vlookup with Another Vlookup

  1. #1
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Replace #N/A of a Vlookup with Another Vlookup

    Hi there,

    I'm trying to replace the #N/A in a vlookup with another value from a vlookup, but all I'm getting is an #N/A. When I trace my error, excel says the issue is in the first vlookup, but that is what I'm trying to replace! It's as if the two if statements are not connected

    Here is my formula


    =IF(ISNUMBER($A10),VLOOKUP($A10,INRspot,2,FALSE)),IF(ISNA(VLOOKUP($A10,INRspot,2,FALSE)),VLOOKUP(Sheet1!$J18,INRSpotHaver,1))

    It's probably something tiny that I'm not seeing--two heads are better than one!!

    Any help is really appreciated

  2. #2
    Forum Contributor
    Join Date
    07-15-2013
    Location
    New York, NY
    MS-Off Ver
    Excel 2010
    Posts
    129

    Re: Replace #N/A of a Vlookup with Another Vlookup

    Just solved it. My If statements weren't nested correctly

    Here's the correct formula

    =IF(ISNA(IF(ISNUMBER($A10),VLOOKUP($A10,INRspot,2,FALSE))),VLOOKUP(Sheet1!$J18,INRSpotHaver,1),IF(ISNUMBER($A10),VLOOKUP($A10,INRspot,2,FALSE)))

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,463

    Re: Replace #N/A of a Vlookup with Another Vlookup

    Maybe:

    =IF(ISNUMBER($A10),VLOOKUP($A10,INRSpot,2,FALSE),IF(ISNA(VLOOKUP($A10,INRSpot,2,FALSE)),VLOOKUP(Sheet1!$J18,INRSpotHaver,1)))


    You could also use IFERROR to trap the error in each VLOOKUP

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Guru
    Join Date
    03-02-2006
    Location
    Los Angeles, Ca
    MS-Off Ver
    WinXP/MSO2007;Win10/MSO2016
    Posts
    12,612

    Re: Replace #N/A of a Vlookup with Another Vlookup

    Try:
    Please Login or Register  to view this content.
    Ben Van Johnson

+ 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. find with vlookup and replace the value
    By memrah in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-05-2012, 12:39 PM
  2. Vlookup find and replace
    By nicolaforni in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 11-03-2011, 07:21 AM
  3. VLOOKUP and Delete or Replace or...
    By kgbonafide in forum Excel General
    Replies: 1
    Last Post: 07-27-2011, 04:13 PM
  4. Macro to replace VLOOKUP
    By EHarvill in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-12-2011, 10:36 AM
  5. [SOLVED] When VLOOKUP returns a #N/A How can you get it to replace #N/A wi.
    By Cmatise in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 01-11-2005, 09:06 PM

Tags for this Thread

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