+ Reply to Thread
Results 1 to 6 of 6

conditional formatting - make a cell become a color if two cells equal each other

  1. #1
    Forum Contributor
    Join Date
    12-07-2013
    Location
    Staten Island, New York
    MS-Off Ver
    Excel 2010
    Posts
    106

    conditional formatting - make a cell become a color if two cells equal each other

    Hi everyone. I'm an accountant working on a trial balance. After posting each journal entry, both sides should be equal. So I want a cell to turn a color to give me a visual indicator that everything adds up correctly and equals.

    So for example:

    I want cell K1 to turn red if cells H16 and I16 are equal. Also, is there a way to get the cell to go back to being without color so I can redo the whole process?

    Can anyone help me put this together?

  2. #2
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: conditional formatting - make a cell become a color if two cells equal each other

    You can add a conditional formatting rule to K1 that looks like this:
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  3. #3
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: conditional formatting - make a cell become a color if two cells equal each other

    ...using Conditional formatting, wit the formula =H16=I16
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  4. #4
    Forum Contributor
    Join Date
    12-07-2013
    Location
    Staten Island, New York
    MS-Off Ver
    Excel 2010
    Posts
    106

    Re: conditional formatting - make a cell become a color if two cells equal each other

    So to go through the steps, in conditional formatting I change it to 'formula is' and in the box I put =$H$16=$I$16.

    What do I do from there though?

  5. #5
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,082

    Re: conditional formatting - make a cell become a color if two cells equal each other

    Select the cell

    Conditional Formatting
    New Rule
    Use a formula to determine...

    Enter formula

    Format as required
    Use Format painter (paintbrush icon) to copy to other cells
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  6. #6
    Valued Forum Contributor
    Join Date
    11-15-2010
    Location
    Dallas, TX
    MS-Off Ver
    Excel 2003
    Posts
    538

    Re: conditional formatting - make a cell become a color if two cells equal each other

    I see that you're going for "red when okay." Here's another approach to consider with "green when okay," giving your cells either a green, red or white background. First, set the conditional format as others are directing (I prefer to use the color orange there, since black-on-red is hard to read, and usually black is the [foreground] font), except instead make your condition =H16<>I16. So the conditional recoloring is based on failure, not success. When the conditional format setting is complete, set the background color to green by the usual way with the "tipped paint bucket" on your Home Ribbon (technically it's the "fill color") for the same cells. Then
    -If a cell is green, it passed the check
    -If a cell is orange, it failed
    -If neither, that is not a tested cell.
    (I prefer a light green, also giving better visual contrast with black font)

    This satisfies your original concern that the process is reusable. If a cell is "okay" at one time, it shows green; if the next month's numeric data is "not okay," it shows orange, and there's no extra work on your part, except to update the numeric data.

    You can ignore the rest of this post if you like: if you are comfortable with macros or can get someone who is, here's a way to automate the process. I have probably applied this macro to tens of millions of cells over time. As commented, it is ideal as a menu item in Excel 2003; for later versions, one can add it to the wimpy QAT.
    Please Login or Register  to view this content.
    Chip, if you can read this, you're STILL making the world a better place with your immeasurably valuable gifts. Every week, you continue to help me (and untold numbers of others) tremendously. Practically no alternative outlets can match your effectiveness, even over the vast number of topics you demystify and empower usage of. You were, and still are, amazing.

+ 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] Conditional Formatting Formula - Chang color of cells is other cell is equal to..
    By Nitefox in forum For Other Platforms(Mac, Google Docs, Mobile OS etc)
    Replies: 6
    Last Post: 09-29-2013, 11:00 PM
  2. Replies: 3
    Last Post: 08-03-2012, 03:45 AM
  3. Replies: 3
    Last Post: 11-16-2007, 10:16 AM
  4. Cell Formatting Conditional On Other Cells Fill Color?
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2006, 12:25 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