+ Reply to Thread
Results 1 to 8 of 8

Conditional Format to highlight < but not =

  1. #1
    Registered User
    Join Date
    02-22-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    7

    Conditional Format to highlight < but not =

    I'm comparing two columns within two pivot tables...

    My conditional format is: =AND(K6<C6,K6<>C6) ... apply soft red highlight

    What I get is correct highlight but I also get a highlight on an "equal" values?

    Thanks for your help

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Conditional Format to highlight < but not =

    The second condition is redundant; if K < C, then K <> C.

    The values may appear to be the same as formatted, but only unequal values will be highlighted.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional Format to highlight < but not =

    Not sure why you need the K6<>C6 since by definition if K6<C6 it isn't! Surely the K6<C6 is sufficient?

    However what is actually in K6 & C6? Have you tested them with =K6=C6 to see if you get a TRUE. Sometimes values that look equal aren't in fact. For instance 123 as a numeric looks exactly like the string 123 but the two are different.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  4. #4
    Registered User
    Join Date
    02-22-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional Format to highlight < but not =

    You are right... I only want highlights for cells that are lesser-than, right now I'm getting highlights for "equals" in addition to the lesser-thans?

    I'm comparing two pivot tables but they should be rendering the same numeric format.

  5. #5
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional Format to highlight < but not =

    Have you actually checked that the the two numerics are the same? Test them both with =ISNUMBER()
    You probably have two numbers which may look the same but due to the imprecision of floating point decimals they may be different at the extreme end of the decimal. In which case try wrapping your test in a ROUND(). e.g. Round(K6,3)<Round(C6,3)

    Otherwise are you able to upload the workbook?

  6. #6
    Registered User
    Join Date
    02-22-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional Format to highlight < but not =

    Richard,

    Thank you. The absolute values are not equal but the rounded up values are - hence, the reason why my cells are highlighting.

    I now have another question relating to the same comparison and highlight..

    Can I use Conditional Formatting to highlight cells that are "less than" a comparative cell but are so by a value of at least 2? (ex. highlight 8<10 but not 8<9)
    ... maybe the formula would look similar to =and(k6<c6,k6-c6= value =2 or greater") ... of course the formula would not look exactly like that

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Conditional Format to highlight < but not =

    Hi,

    Yes, use

    Formula: copy to clipboard
    Please Login or Register  to view this content.

  8. #8
    Registered User
    Join Date
    02-22-2011
    Location
    Portland, OR
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Conditional Format to highlight < but not =

    Thank you Richard, works like a charm

+ 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 format to highlight row
    By fentiger79 in forum Excel General
    Replies: 2
    Last Post: 09-24-2012, 09:18 AM
  2. [SOLVED] Conditional Format to Highlight entire Row?
    By shital shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 PM
  3. [SOLVED] Conditional Format to Highlight entire Row?
    By shital shah in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-06-2005, 07:05 AM
  4. highlight row :Conditional Format to highlight entrire Row
    By shital shah in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-25-2005, 11:05 AM

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