简体   繁体   中英

Change color of a cell based on another cell

Say i have a list of 100 items. I want to automatically change the color of a specific cell of the item based on whether that item has been sold partially or not. So like if i have 100 quantities of this stock, if it's still 100 after one month then it should be red. Otherwise it should be changed to green if sales are made within that month.

Sorry if this is simple, much appreciated!

Based on the information this can be easily achieved using conditional formatting

I have populated a sample data below

Sample

Using conditional formatting, you need to set two rules

  1. Turn Cell background to red if no values present in row
  2. Turn cell background to green values present in row

Considering the sample data above, you need to select the Cells from C2 to C4 and create conditional formatting -> New rules -> Use a formula to determine which cells to format

Rule 1

then create one more rule

Rule 2

it should look like this in summary

summary

Click apply and you will have the result required

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