Sometimes, when formatting cells in a spreadsheet, it’s handy to be able to change the visual appearance of data depending on the value of that data. You may, perhaps, want to outline a cell in a bright color if the value within is approaching a critical value.
Via the Format menu in Sheets you can apply specific text and background colors to particular cells dependent on whether the data values in a certain range match criteria you have set.
Let’s take an example where our spreadsheet displays the value of a stock market index and compares it with yesterday’s value. Highlight the cell in question, where the result is shown, and select Format > Conditional formatting … from the menu. A dialog will open, within which you can set any number of logical rules for how your data will be displayed:
Here I’ve elected to display the cell contents in green if positive, and in red if negative: