简体   繁体   中英

Enable Excel Conditional Formatting Based on Neighbouring Cell

For background, I operate a small side busines and use excel to record my activity. Every month, I set funding targets for different categories (eg paying employees, research and development, ordering samples, etc). Broadly, theses categories either fall into the category of being goals (that is, I aim to meet the funding target) or limits (I am not to exceed the target). Currently, I use excel's 2-colour scale to get an easy graphical overview of how close I am to meeting my funding. I have a coloumn which shows percent funding for the month, and as I get closer to 100% funding for a given category the cell colour turns from a light green to light red. This is extremely useful to me - I can see at a glance where I should allocate revenue once it comes in.

What I want to achieve is setting an attribute for each category (either goal or limit) such that for a goal, the colour of the percent funding cell changes from red to green as I approach 100% funding and for limits, the colour of the percent funding cell changes from green to red as I approach 100% funding. I have no idea how to achieve this in excel - using the " use a formula to determine which cells to format " function allows me to make a distinction between goal and limit rows but then does not allow me to use the 2-color scale format.

Anyone have any insights into how this could be resolved?

You can achieve the same results by using multiple rules.

Say your cell is A2 and the value you are comparing is B2. In cell A2 you can have rules like these:

Rule 1: B2/C2 >= 0.9 Font Green

Rule 2: B2/C2 >= 0.5 Font Blue

Rule 3: B2/C2 >= 0.2 Font Red

For each rule except the last select the checkbox to stop further processing if true.

Then you can copy the cells down to copy the rules relatively. Make sure that the rules do not have absolute references like $B$2 which is the default.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM