简体   繁体   中英

Changing the value of a cell in excel based on results in a range

I'm trying to automatize the result of a cell based on the color or data from a range. Explanation: It will be a "OK" or "NOT OK" in a cell when there are red cells in a range or when there are some words there. Down is the image about an example of the table I want to work with.

Example

I want to know if it is possible to do it only with formula or have to do it through VBA.

If you need to use the color you will have to use vba, you can check the color of a cell with Cell.Interior.Color

On a side note, if you do not want to use vba you could use the condition you use for your conditional formatting (Assigning the color to the cell) in the cell formula instead of using the color.

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