+ Reply to Thread
Results 1 to 3 of 3

INDEX/MATCH with no match

  1. #1
    Registered User
    Join Date
    12-03-2008
    Location
    The Swamp
    MS-Off Ver
    2000 Pro
    Posts
    75

    INDEX/MATCH with no match

    I really appreciate all the help that I've received here.

    Using that help, I built my own index/match function. It works, unless there is no match, then I get the #NA result. I want it to return a blank.

    I tried the ISERROR and that converts it to true / false & it won't let me add "" to the end, like a general 'if' statement.

    Thanks
    Last edited by Georgia Golfer; 01-02-2009 at 05:55 PM.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320
    you have to wrap it in IF
    if(iserror(your index match here),"",your index match here)

    e.g

    if(iserror(INDEX(G1:H8,MATCH(A1,G1:G11,0),2)),"",INDEX(G1:H8,MATCH(A1,G1:G11,0),2))
    Last edited by martindwilson; 01-02-2009 at 03:59 PM.

  3. #3
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    If you're going to have a LOT of IF(ISERROR() formulas, you might want to put the IFERROR function from Excel 2007 into your version of Excel. If you don't, you're effectively making Excel do every calculation twice.

    The IFERROR User-Defined Function stops that, and the formula gets simpler, too.

    =IFERROR(youroriginalformulahere, "")


    Please Login or Register  to view this content.
    Copy that code into a Module (same place your regular macros go) and you can use it straightaway.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

+ 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