+ Reply to Thread
Results 1 to 11 of 11

Conditional formatting: how to compare multiple values

  1. #1
    Registered User
    Join Date
    08-24-2017
    Location
    London
    MS-Off Ver
    7
    Posts
    6

    Lightbulb Conditional formatting: how to compare multiple values

    Hi,

    I need to compare multiple values ( 20 columns of 100 rows) with four columns and need to highlight values, which are not equal to the values located in the same row in those 4 columns. Each value may be equal to one of the values in the row on the left. If not it needs to say: WRONG or to be highlighted

    Example:

    Correct values Values which need to be compared
    Dog Cat Elephant Mouse Mouse Pig Cat
    Dog Cat Horse Mouse Dog Cat Horse
    Dog Cat Horse Mouse Fish Pig Dog
    Dog Cat Dog Mouse Mouse Pig Cat
    Dog Cat Horse Mouse Mouse Pig Dog
    Dog Cat Horse Mouse Pig Dog Pig

    In the first row "Pig" needs to be highlighted because it is not among the values listed in the same row on the left.
    In the second row "Mouse" needs to be highlighted because it is not among the values listed in the same row on the left.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting: how to compare multiple values

    in the first row
    cat is not the same as values on the left, nor is elephant nor is the first mouse
    so why pig ?

    and why mouse on 2nd row and not on first

    perhaps
    Please upload a small clean sample of your data / workbook (not a picture) to the forum, Make sure you have removed any private information, remember this is a public forum and so available to anyone
    We would like to see an example of your data and also a manual mock up of the expected results you want to achieve.

    To attach a file to your post,
    click "Go advanced" (next to quick post),
    scroll down until you see "manage Attachments",
    click that and select "Choose File" (top Left corner).
    Find your file, click "Open" click "upload" click 'close windows" Top Right. click "Submit Reply"

    Once the upload is completed the file name will appear below the input boxes in this window.
    You can then close the window to return to the new post screen.
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    08-24-2017
    Location
    London
    MS-Off Ver
    7
    Posts
    6

    Re: Conditional formatting: how to compare multiple values

    Hi,

    Thank you for your reply.
    My apologies, the two columns in the problem description have been merged and made unclear what I meant.
    Attachment 535062

    I manually highlighted in red values which are not equal to the values in the same row on the left.
    Attached Files Attached Files
    Last edited by Aleksandramailas; 08-24-2017 at 06:49 AM.

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting: how to compare multiple values

    use a conditional format rule
    =COUNTIF($A3:$D3,E3)=0
    but
    why is monkey highlighted in cell f3


    for 2007, 2010 , 2013 or 2016 excel version
    Conditional Formatting

    Highlight applicable range >>

    $E$3:$V$11


    Home Tab >> Styles >> Conditional Formatting
    New Rule >> Use a formula to determine which cells to format
    Edit the Rule Description: Format values where this formula is true:


    =COUNTIF($A3:$D3,E3)=0


    Format… [Number, Font, Border, Fill]
    choose the format you would like to apply when the condition is true
    OK >> OK
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-24-2017
    Location
    London
    MS-Off Ver
    7
    Posts
    6

    Re: Conditional formatting: how to compare multiple values

    Thank you very much! It works!

  6. #6
    Registered User
    Join Date
    08-24-2017
    Location
    London
    MS-Off Ver
    7
    Posts
    6

    Re: Conditional formatting: how to compare multiple values

    And is there a way to apply a similar formula =COUNTIF($A3:$D3,E3)=0 , but to make it format cells which are FALSE instead of TRUE?

  7. #7
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting: how to compare multiple values

    Quote Originally Posted by Aleksandramailas View Post
    And is there a way to apply a similar formula =COUNTIF($A3:$D3,E3)=0 , but to make it format cells which are FALSE instead of TRUE?
    =COUNTIF($A3:$D3,E3)<>0

    or simply

    =COUNTIF($A3:$D3,E3)

    should do it.

  8. #8
    Registered User
    Join Date
    08-24-2017
    Location
    London
    MS-Off Ver
    7
    Posts
    6

    Re: Conditional formatting: how to compare multiple values

    Thank you, but again it highlights cells which are TRUE, which ARE EQUAL to the values in a range of $A3:$D3.
    Would it be possible to highlight values which are FALSE and do not exist among values in $A3:$D3?

  9. #9
    Forum Expert 63falcondude's Avatar
    Join Date
    08-22-2016
    Location
    USA
    MS-Off Ver
    365
    Posts
    6,266

    Re: Conditional formatting: how to compare multiple values

    Quote Originally Posted by Aleksandramailas View Post
    Would it be possible to highlight values which are FALSE and do not exist among values in $A3:$D3?
    Is that not what etaf gave you in post #4?

  10. #10
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.84 (24041420))
    Posts
    8,751

    Re: Conditional formatting: how to compare multiple values

    =COUNTIF($A3:$D3,E3)=0
    false
    as shown on the sample i attached

    =COUNTIF($A3:$D3,E3)>0 or =COUNTIF($A3:$D3,E3)
    true

  11. #11
    Registered User
    Join Date
    08-24-2017
    Location
    London
    MS-Off Ver
    7
    Posts
    6

    Re: Conditional formatting: how to compare multiple values

    I got it now. Everything is working!Thank you very much.

+ 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. Conditional Formatting - Multiple Values
    By Leaves82 in forum Excel General
    Replies: 4
    Last Post: 03-13-2017, 03:24 PM
  2. Conditional formatting - multiple values
    By glassen89 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-20-2015, 05:03 PM
  3. Conditional formatting against multiple values
    By mthomas66 in forum Excel General
    Replies: 2
    Last Post: 04-16-2015, 08:27 AM
  4. Replies: 3
    Last Post: 11-22-2011, 02:06 PM
  5. Using conditional formatting to compare values
    By Celabe in forum Excel General
    Replies: 5
    Last Post: 01-06-2010, 11:48 AM
  6. Conditional Formatting for multiple values
    By Daniinboston in forum Excel General
    Replies: 1
    Last Post: 08-03-2006, 12:40 PM
  7. Conditional Formatting, Multiple Values
    By Lara in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 06-28-2006, 06:45 PM

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