简体   繁体   中英

if a cell has specific formatting, change another cell to a specific value

if a cell has specific formatting or text, i need it to then tell another cell to be a specific value. see example picture enter image description here

notice how because the cell is green and has white bold text, the cell right above it has a value of 2 and the red cell does not have a value.

The same can apply if a cell is red with yellow bold text. if this is the case, it can subtract 1 point. if cell is yellow text and green background, no points are awarded or taken away. enter image description here

does anyone know how to accomplish this without having to manually do this every time? Thank you in advance.

Color is not data. You can't change a cell value based on another cell's color. Not with a formula and not with VBA. This approach is the wrong way around.

It is quite easy to change a cell's color based on the value of another cell. That can even be done without any formulas or VBA code, using simple conditional formatting.

If you or your users are in the habit of applying color and that color has a specific meaning, well, the best advice here is to change that habit. Excel works on values. Color is not data. It's metadata, and not suitable to serve as the primary tool for data classification.

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