+ Reply to Thread
Results 1 to 6 of 6

Highlighting a cell based on 2 different cells values

  1. #1
    Registered User
    Join Date
    10-02-2013
    Location
    London, UK
    MS-Off Ver
    Excel 365
    Posts
    42

    Highlighting a cell based on 2 different cells values

    test.JPG

    Hello,

    I would need your help regarding the following issue (excel file also attached).
    I would like to get a formula (if there is) in order to highlight the cells in column B :
    - IF the value in B are 0 AND the value in C is not 0 (i.e. green cells in my example)
    - IF the value in B are not 0 AND the value in C is 0 (i.e. blue cells in my example)

    Thank you so much in advance!

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS 365 Family 64-bit 2502
    Posts
    26,995

    Re: Highlighting a cell based on 2 different cells values

    There is no file attached. The paper clip icon does not work for attachments. Instead, under the text box where you type your reply click the Go Advanced button. On the next screen scroll down and click on Manage Attachments, which will show a pop-up window to Select and Upload a file. Then close the window.

    You will use Conditional Formatting, and use a formula. You will need two rules, one for each color. For the first:

    Highlight column B and use this formula:
    =AND(B1<>"",B1=0,C1<>0)
    green fill

    Highlight column B and use this formula:
    =AND(B1<>0,C1=0)
    blue fill
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    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
    48,515

    Re: Highlighting a cell based on 2 different cells values

    Select cells B2 downwards and try Conditional Formatting formulae:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    respectively. Choose appropriate colours.
    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


  4. #4
    Registered User
    Join Date
    10-02-2013
    Location
    London, UK
    MS-Off Ver
    Excel 365
    Posts
    42

    Re: Highlighting a cell based on 2 different cells values

    Hello,

    thank you so much for your quick replies, but unfortunately the formulas haven't worked...
    I take back strange results...
    Please see my Excel attachment.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-02-2013
    Location
    London, UK
    MS-Off Ver
    Excel 365
    Posts
    42

    Re: Highlighting a cell based on 2 different cells values

    TMS's solution just worked!

  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
    48,515

    Re: Highlighting a cell based on 2 different cells values

    You're welcome. Thanks for the rep.

+ 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] highlighting cells in row based on specific cell value
    By monika_s in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-20-2017, 10:48 AM
  2. Highlighting Cell Values based on Previous Cell
    By Dooley Mack SC in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-10-2015, 12:54 PM
  3. Highlighting consecutive cells based on values
    By thelegazy in forum Excel General
    Replies: 2
    Last Post: 07-22-2013, 05:24 PM
  4. Highlighting duplicate cells based on values in the new entry being made
    By KK1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-15-2013, 02:06 PM
  5. Highlighting values based on name and date
    By apex_chio in forum Excel General
    Replies: 2
    Last Post: 02-20-2013, 01:21 AM
  6. Highlighting cells based on them matching another list of values
    By david1987 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-22-2012, 08:26 AM
  7. need to get the macro for highlighting cells with -ve,+ve values.
    By karingulanagaraj in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 06-21-2012, 05:38 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