1.2K
Precise colours as a hint can be very helpful in extensive Excel tables. With the logic function “if-then” you can quickly provide the corresponding cells with event-dependent colours.
Change cell colour in Excel: Per if-function
In our example, we manage our stock with an Excel spreadsheet. As soon as an item falls below a predefined minimum stock level, the corresponding cell is to turn red via an if-function. The example was created with Microsoft Excel 2013.
- First we create a mini-table in which we enter some articles as well as the corresponding stock quantity.
- We then consider the respective minimum quantity for each item. If you want the same minimum stock to apply to several items, mark the corresponding cells all at once.
- After the preliminary work is done, select the tab “Start”.
- In the quick start bar, go to “Conditional formatting”.
- In the context menu “Conditional Formatting” decide on the first option “Rules for highlighting cells”.
- As we want to have a colour warning for an item understock, select the logic function “Smaller than”.
- In the “Smaller than” menu you now enter the value from which a certain reaction – i.e. a colour change of the cell – should take place (see screenshot).
- Finally, you just select a colour for the cell, the font or the cell border. You have a variety of marking options.
- In our example, we decide to use the signal colour red as soon as the number of brushes falls below 300.
- Feel free to experiment a little with the “Conditional Formatting”. The tool offers you a lot of options that are useful and, above all, very convenient and quick to use.
Set colours via if-functions: How to do it
In this example, we show you how to change cell colours using an if-function. Here you can use many other conditions besides “less than”, such as “greater than”, “between two values” or “equal to value”.