+ Reply to Thread
Results 1 to 3 of 3

Return blank if lookup result is 0 or NA?

  1. #1
    Registered User
    Join Date
    02-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Return blank if lookup result is 0 or NA?

    I am using index match as a replacement to vlookup formulae and i want it set up so that if the result is N/A OR 0 then the cell is left blank

    i have two working formulae, one that can return blank if the cell is N/A, one that returns blank if result is 0, but i cannot seem to figure out how to nest them into one formula?

    This one returns blank if cell is NA

    IF(ISNA(MATCH($B5,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0)),"",INDEX('[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$N$13:$N$45000,MATCH($B5,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0)))

    this one returns blank if cell is 0

    =IF(INDEX('[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$N$13:$N$45000,MATCH($B6,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0))=0,"",INDEX('[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$N$13:$N$45000,MATCH($B6,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0)))

    Any help much appreciated
    Last edited by Fursmanm; 07-30-2012 at 08:57 AM. Reason: solved

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Return blank if lookup result is 0 or NA?

    IF(ISNA(MATCH($B5,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0)),"",IF(INDEX('[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$N$13:$N$45000,MATCH($B6,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0))=0,"",INDEX('[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$N$13:$N$45000,MATCH($B6,'[20120702 Overview Health and Social Care Market.xls]Current Compliance'!$A$13:$A$17739,0))))
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    02-24-2012
    Location
    london
    MS-Off Ver
    Excel 2003
    Posts
    31

    Re: Return blank if lookup result is 0 or NA?

    Brilliant, thank you!

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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