How to compile conditional 3 color-scale Excel rule

点点圈 提交于 2021-01-29 13:23:49

问题


I want to know what I would need to type into the formula box in excel to solve the problem outline below:

Key: *Variable/Cell*

IF *cellnumber* = 0 shade cells red
IF *cellnumber* > (more than) 0 but < (less than) *cell number* shade cells yellow
IF *cellnumber = *cellnumber* shade cells green.

回答1:


You want Conditional Formatting. Pre-Excel 2007 go to the Data menu and click conditional formatting. Excel 2007 or later go to the Home ribbon and click Conditional Formatting. Here is a guide to conditional formatting that shows something similar to what you need.

As for the second and third condition that apply to the value in another cell, you can put a reference in the conditional formatting window similar to "Cell Value : Equal to :" then =$A$1 in the value box.

For 2011: Any quotes below should NOT be typed. This assumes the cell you want to check against is A1.

  1. Select the range you want to be colored
  2. Home Ribbon -> Conditional Formatting -> Manage Rules
  3. New Rule
  4. "Format Only Cells That Contain"
  5. Choose: Cell Value & between
  6. Enter in "0" and "=$A$1" (remember, no quotes)
  7. Click Format -> Fill, choose yellow
  8. Click Ok
  9. New Rule
  10. "Format Only Cells That Contain"
  11. Choose Cell Value & Equal
  12. Enter in "0"
  13. Click Format -> Fill, choose red
  14. Click Ok
  15. New Rule
  16. "Format Only Cells That Contain"
  17. Choose Cell Value & Equal
  18. Enter in "=$A$1"
  19. Click Format -> Fill, choose green
  20. Click Ok


来源:https://stackoverflow.com/questions/7169299/how-to-compile-conditional-3-color-scale-excel-rule

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!