+ Reply to Thread
Results 1 to 8 of 8

Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

  1. #1
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    Hi,

    I've attached a mocked sample workbook of what i'm doing.

    There are 3 sheets:
    • Main-Internal --- This is a general database of default information
    • Public-External --- This is a database of special instructions if a specific customer be linked to a product
    • Entry-Database --- This is where i operate and enter new rows of data regularly

    Cell formula:

    There's one main formula in play, in my "G" column on the 'Entry-Database' sheet. It essentially says:
    If i have not entered a customer name in "E", then go with the default comments for that product from Table2 on sheet 'Main-Internal', but if i did put a customer in "E" then output the remark for that product specifically tailored to that customer found on Table3 on sheet 'Public-External'.

    Conditional formatting (validation):
    • Product exists (Fill cell color green)
      Please Login or Register  to view this content.
    • Customer Exists (Fill cell color green)
      Please Login or Register  to view this content.
    • Product name does NOT exist on the External/Customer table (Fill cell color purple)
      Please Login or Register  to view this content.

    My problem - The 3rd conditional format (purple):

    This seemed to work alright initially... But as soon as i listed more than one row for the same customer, but different product name & comment, it only recognizes the topmost sorted value.

    So even though i want all of the below values to show up green (if not blank), only one will stay green while the rest (from the same customer name) show purple even though they do exist in the table and are associated with that customer name. Is there a better way to write this so a cell only fills purple if that product name is indeed NOT in 'Public-External'!$B:$B ?

    Thanks
    Attached Files Attached Files

  2. #2
    Forum Contributor
    Join Date
    06-28-2016
    Location
    Pennsylvania, USA
    MS-Off Ver
    2013
    Posts
    308

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    I'm confused as to what you are trying to achieve here, sorry.

    Could you possibly mock it up so we can see expected results of the area you are having trouble with. This sounds quite easy to achieve, but I don't quite grasp your explanation fully. Can you possibly color the cells purple as they should be manually, so I can see what it is you are asking for. There is no conditional formatting applied to this mock up either, so maybe it is not the version you wished to post?

  3. #3
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    Oh weird - The conditional formats are in the 'Rules Manager' for me when i download it, for Table5. Hmm well yes let me see if i can be a little more clear.

    Mainly,

    -I want to be alerted in some way (the cell color change to green) when i enter something on Sheet3!$F:$F that does not exist in Sheet1!$A:$A

    -I also want to be alerted (another green fill, diff column) when i enter something on Sheet3!$E:$E that does not exist in Sheet2!$A:$A
    (Often times i wont enter anything in Sheet3!$E:$E and leave it blank, this is normal and fine)

    Both of those seem to work fine, no problem. Below has been hard to figure out how to write properly.

    -When i DO enter something in Sheet3!$E:$E, that means i will want to be alerted (fill cell purple) if Sheet3!$F:$F does not exist in Sheet2!$B:$B

    ^ The trick to that is, i need it to check a little more than whether or not it exists in Sheet2!$B:$B. It needs to exist there AND be in a row that Sheet2!$A:$A value matches Sheet3!$E:$E
    Which my existing condition seems to do, until it realizes that in some cases Sheet2!$A:$A can have several rows containing identical text.

    I'm hoping that clears something up - i've gotta run and don't have time at the moment to re-mock, but i will tomorrow if there's no response.

  4. #4
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    Ok i've uploaded an updated mock which i've removed conditional formulas and inserted a few notes onto Sheet3.

    Let me know if there's any more info i can provide or make clearer.

    Main focus is the purple fill - don't worry much about green.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    Bump - Anything on this anybody?

  6. #6
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    If I understand correctly you want the cell to fill purple if it contains a product that is in the main - internal sheet but is not associated with a customer in the public - external sheet. Seems to me that is what the formula in column G of the entry - database sheet already targets, with the #Value error. That being the case you could use the following as a formula applied to the range F2:F16 on the entry - database sheet: =ISERR(G2)
    Notice that in the attached copy of your file I did as you suggest and add one of the lines (office supply place - binder) to the table on the public - external sheet which causes the purple fill to disappear.
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  7. #7
    Registered User
    Join Date
    07-03-2016
    Location
    Washington, USA
    MS-Off Ver
    2016
    Posts
    38

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    Oh, cool! That seems so simple.

    My real workbook doesn't actually have the formula output of G2 on the same table i would actually enter data and want to see the purple - but i just put the same formula in a hidden column and this works great!

    Thanks a lot, seems bug-free so far.

  8. #8
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,568

    Re: Conditional formatting using Index(Match()) - faulty when 1 criteria has duplicates

    You're Welcome. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Formula to Index match multiple criteria with conditional formatting for leave calendar
    By meckenzie2012 in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 06-19-2016, 02:22 PM
  2. Conditional formatting with INDEX MATCH MATCH
    By jawebb in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 04-28-2016, 05:01 AM
  3. Index/match for multiple criteria when duplicates exist
    By dasranch in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 11-26-2015, 12:05 AM
  4. [SOLVED] Conditional Formatting duplicates with four criteria
    By L plates in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 02-07-2015, 02:31 PM
  5. Conditional formatting using Index/Match
    By sj123 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-14-2014, 03:19 PM
  6. [SOLVED] Matching duplicates based on multiple criteria, conditional formatting?
    By Jaqjaq in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-23-2013, 02:42 PM
  7. Simple solution. Criteria based conditional formatting. (Index match) HELP!
    By omni13 in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 11-18-2013, 12:11 PM

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