简体   繁体   中英

Excel conditional formatting for previous value in same cell

I am looking forward to update the excel cell in colour based on the data received from an external source. The data is getting updated as expected in a cell. I want to change the colour of the cell based on the received data.

Assume the selected cell is A3. The data comes in a internal of 3 seconds. Assume data that comes is 10 15 12 18 20. For these data I want the colour to be red green red green green.

Red indicates that the value is less than the previous value and green indicates that the value has increases as compared to previous value.

I have used conditional formatting, but did not find a feature to compare previous value in same cell

Suppose V is a JSON object which has a key-value object . You can retrieve data like this.

const rapidjson::Value& V;
for (Value::ConstMemberIterator iter = V.MemberBegin(); iter != V.MemberEnd(); ++iter){
    printf("%s\t", iter->name.GetString());
    printf("%s\t", iter->value.GetString());
}

( ref .)

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