+ Reply to Thread
Results 1 to 4 of 4

Thread: IF(OR(ISERROR Problem

  1. #1
    Forum Contributor
    Join Date
    04-11-2008
    Posts
    153

    IF(OR(ISERROR Problem

    Hi,

    PLease can you help me identify why this formula is not working?

    =IF(OR(ISERROR(VLOOKUP(A302,'[January Stats_02.02.12.xls]Stats'!$A$2:$E$301,5,FALSE)),VLOOKUP(A302,'[January Stats_02.02.12.xls]Stats'!$A$2:$E$301,5,FALSE)=0),"New")

    Basically, if the first VLOOKUP returns an error or the second vlookup returns a "0", I want the formula to return "New". At the moment, only the second VLOOKUP is working i.e. if the reference IS found and the value is "0" the formula returns "New" and if the reference IS found and the value is not "0" the formula returns "FALSE". However, if the reference IS NOT found, the formula returns #N/A but I want it to return "New".

    Thank you

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    Excel 2007
    Posts
    6,225

    Re: IF(OR(ISERROR Problem

    Maybe this:

    =IF(ISERROR(1/VLOOKUP(A302,'[January Stats_02.02.12.xls]Stats'!$A$2:$E$301,5,FALSE)),"New")
    "Relax. What is mind? No matter. What is matter? Never mind!"

  3. #3
    Valued Forum Contributor
    Join Date
    07-16-2010
    Location
    Northumberland, UK
    MS-Off Ver
    Excel 2007 (home), Excel 2010 (work)
    Posts
    1,958

    Re: IF(OR(ISERROR Problem

    The problem is that if the reference isn't found then the value #NA will be returned, so for unfound references your formula reads:

    =IF(OR(ISERROR(#NA),#NA=0),"New")

    Which will return a #NA, because #NA can not be compared to a numeric value.

    Try:

    =IF(ISERROR(VLOOKUP(A302,'[January Stats_02.02.12.xls]Stats'!$A$2:$E$301,5,FALSE)),"New",IF(VLOOKUP(A302,'[January Stats_02.02.12.xls]Stats'!$A$2:$E$301,5,FALSE)=0,"New")

  4. #4
    Forum Contributor
    Join Date
    04-11-2008
    Posts
    153

    Re: IF(OR(ISERROR Problem

    Perfect, thank you

+ 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.2.0