+ Reply to Thread
Results 1 to 6 of 6

Conditional Formatting with Index/Match function

  1. #1
    Registered User
    Join Date
    06-15-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    5

    Conditional Formatting with Index/Match function

    Hello,

    I'm struggling with adding conditional formatting to a function that combines index and match

    Here is the function:
    =INDEX('Sheet2'!$C$7:$C$91,MATCH(A12,'Sheet2'!$B$7:$B$91,0))

    So this function returns values when there is a value, but more often than not it returns #N/A when there's no match.

    How do I white-out the #N/A to unclutter how my page looks? I tried to use the "text that contains" option on conditional formatting but nothing happens. Do I need to add some sort of If function (maybe with istext) around the existing function?

    Thank you for the help.
    Last edited by zhopa19; 06-16-2011 at 10:17 AM.

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Conditional Formatting with Index/Match function

    You could modify your original formula to prevent the #N/A like so (in Excel 2007)

    =IFERROR(INDEX('Sheet2'!$C$7:$C$91,MATCH(A12,'Sheet2'!$B$7:$B$91,0)),"")

    or, if you want to white out the #N/A
    Assuming column A beginning with A2
    =ISNA(A2)
    Does that work for you?
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Conditional Formatting with Index/Match function

    Wrap your formula in this IF() function
    =IF(ISNUMBER(MATCH(A12,Sheet2!$B$7:$B$91,0)),"your formula","")

    i.e.
    Please Login or Register  to view this content.

    Hope this helps
    If you need any more information, please feel free to ask.

    However,If this takes care of your needs, please select Thread Tools from menu above and set this topic to SOLVED. It helps everybody! ....

    Also
    اس کی مدد کرتا ہے اگر
    شکریہ کہنے کے لئے سٹار کلک کریں
    If you are satisfied by any members response to your problem please consider using the small Star icon bottom left of their post to show your appreciation.

  4. #4
    Registered User
    Join Date
    06-15-2011
    Location
    NY, NY
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Conditional Formatting with Index/Match function

    Works perfectly. Always looks so simple after someone else does it! Thanks.

  5. #5
    Registered User
    Join Date
    01-27-2010
    Location
    Delhi
    MS-Off Ver
    Excel 2007
    Posts
    5

    Re: Conditional Formatting with Index/Match function

    Kindly help in attachment file to remove #NUM!

    tanks to all
    Last edited by ras408; 10-09-2011 at 07:27 AM.

  6. #6
    Forum Guru (RIP) Marcol's Avatar
    Join Date
    12-23-2009
    Location
    Fife, Scotland
    MS-Off Ver
    Excel '97 & 2003/7
    Posts
    7,216

    Re: Conditional Formatting with Index/Match function

    Hi ras408

    Read this Forum Rules before the moderators get you...

    Forum Rules
    2. Don't post a question in the thread of another member -- start your own. If you feel it's particularly relevant, provide a link to the other thread.
    If you can Edit/Delete your post, do so, if not you'll need to ask a moderator to help you.

    Cheers

+ 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