+ Reply to Thread
Results 1 to 8 of 8

Index Match formula issue

  1. #1
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Index Match formula issue

    Hi,

    I have a formula that I am using to reference and apply a text entry to a cell if conditions are met. I want the formula to show a blank cell if the reference cannot be found. Rather than using 0 as the last entry in the Index Match formula syntax, I have tried "", and have also applied an Iferror to attempt to show the cell as blank if the value cannot be found. Unfortunately I can only seem to use zero in the syntax as the relevant text will not show up at all when the cell has the correct value to drive application of the text entry. As a result, I still get either the text entry or '0' showing up, when I only want a blank cell if the reference cannot be found. Appreciate any help.


    =IFERROR(INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,"")),"")

  2. #2
    Forum Moderator vlady's Avatar
    Join Date
    09-22-2011
    Location
    Philippines - OLSHCO -Guimba-Nueva Ecija
    MS-Off Ver
    2021
    Posts
    4,361

    Re: Index Match formula issue

    you can try to evaluate it first using if

    =if(INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,0))="","",INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,0)))
    hth.
    I think people forget the word "THANK YOU!!!!" Do you still know it???

    There is a little star ( ADD REPUTATION ) below those person who helped you. Click it to say your "PRIVATE APPRECIATION TO THEIR EFFORT ON THEIR CONTRIBUTIONS "

    Regards,
    Vladimir

  3. #3
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Index Match formula issue

    The syntax you have is wrong. You have "" within the MATCH().

    Try: =IFERROR(INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,0)),"")

  4. #4
    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,342

    Re: Index Match formula issue

    The last parameter in a MATCH function is zero to say an exact match, not what to return if blank.

    Try:

    =IFERROR(IF(INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,0))="","",INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,0))),"")


    Regards, TMS

    ---------- Post added at 03:48 AM ---------- Previous post was at 03:47 AM ----------

    Clearly no gold medal for me
    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


  5. #5
    Forum Expert Cutter's Avatar
    Join Date
    05-24-2004
    Location
    Ontario,Canada
    MS-Off Ver
    Excel 2010
    Posts
    6,451

    Re: Index Match formula issue

    If you're returning a text value (as opposed to a numeric value) you can add &"" to suppress a 0 result:

    =IFERROR(INDEX(Categorisation!E:E,MATCH(Data!Z18,Categorisation!F:F,0))&"","")

    Just so you're clear: the IFERROR() suppresses an #N/A error when the reference cannot be found (as your first post says).
    The &"" suppresses a 0 result when the reference is found but the associated cell is blank

    EDIT: TMS - what are you doing still awake?? Waiting for the Mars landing??
    Last edited by Cutter; 08-05-2012 at 11:01 PM. Reason: Added explanation

  6. #6
    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,342

    Re: Index Match formula issue

    @Cutter: mostly age related, the details of which, I will leave to your imagination (or experience). Plus, I'm working on a project and decided to rework the code. When I first put the code together, it was all related to one sheet. Then I needed to make some of it work on two sheets and some of it work on three sheets. It was meant to be generic but it isn't, hence the rework ... and some of the code is spinning round in my head, thus precluding sleep. Nice of you to notice

    ---------- Post added at 04:49 AM ---------- Previous post was at 04:41 AM ----------

    @Cutter: the Mars landing is due in another hour and 40 minutes ... don't know if I can stay awake that long. We'll see.

    ---------- Post added at 05:29 AM ---------- Previous post was at 04:49 AM ----------

    @Cutter: are you watching?

    http://mars.jpl.nasa.gov/msl/participate/
    http://mars.jpl.nasa.gov/msl/multimedia/nasatv/

  7. #7
    Forum Contributor
    Join Date
    11-02-2007
    Posts
    109

    Re: Index Match formula issue

    Brilliant guys, worked beautifully thanks

  8. #8
    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,342

    Re: Index Match formula issue

    You're welcome.

+ 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