简体   繁体   中英

Excel - Cells to change color based on previous cell value

I am trying to create a formula in Excel whereby a cell would change color based on the value in the previous cell.

for example if cell B2 contains value X and then B3 contains value Y, I would like B3 to turn green if B3> B2 else to turn red.

'Standard' fill red the relevant range and select Column B, clear any existing CF rules and HOME > Styles - Conditional Formatting, New Rule..., Use a formula to determine which cells to format and Format values where this formula is true: :

=AND(B1>B1048576,ROW()<>1)

Format... , select green fill, OK , OK .

I am assuming your column is labelled.

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