Conditional formatting is a data visualization tool in several spreadsheet applications. We use it to highlight, emphasize, and differentiate by using colors or other means (like applying icons) to cells or ranges relevant to us. Show
At first, you will learn the essential skills. The second part of the tutorial will be about using Excel conditional formatting formulas and examples. Table of contents:
What is Conditional FormattingConditional formatting offers a wide range of possibilities for Excel users. Its first and foremost function is to direct attention to the most crucial data points. Then, we can determine with rules what are the most important for us. These data points can be deadlines, excellent sales results, or tasks carrying a high risk. Download the practice file! Fundamentals of Conditional FormattingBefore we walk you through all possibilities of conditional formatting, we have to stall a bit. It is necessary to know all the basics! First, you have to understand the structure that conditional formatting provides. So, let’s see a little overview. In short, we will summarize the most important rules for you. Logical Operators (ifthen rules): Every single conditional formatting rule is based on straightforward logic. If “X” criteria are true, then apply the rule “Y”. Let’s see a simple example: “X” criteria are: “The sales price is more than $50.” “Y” criteria are defined as a color all applicable cells red. What will happen now? By applying the ifthen rule, every cell will be colored red where the sales price is > $50, more than $50. Predefined Conditions (builtin presets): This option can interest beginners. In Excel, there are many builtin rules and conditions available. We have also thought about users with different capabilities when making the tutorial. We will learn about this subject from a detailed guide. Userdefined Conditions: There are often situations when the default settings are unsuitable for the given task. No problem, let’s make our own rules. Use the Excel formulas so we can reach the required results. We have to note that we can use all of the formulas in Excel to create the rules. Multiple Conditions: We can simultaneously apply multiple rules for one cell or range. If there are more rules active simultaneously, which one will prevail? We will discuss this in detail in the chapter “rule hierarchy and precedence.” Highlight Cells using rules (if the quantity is greater than 200)Click the Highlight Cells Rules functions to highlight patterns and trends with conditional formatting. It will be straightforward to identify the cells that meet your criteria. This is a basic color formatting method for cells and ranges. Select the range you want to use a rule and apply highlight rules. In our example, we will highlight any product that’s quantity is greater than 200 units. For example, select the range’ H2: H24′. In the Home tab of the ribbon, click Conditional Formatting, then click Highlight Cell Rules. Finally, select ‘Greater than’. Now, a dialog box will appear. Enter 200 In the left box. So, if you enter 200, something will happen when the value is greater than 200. But what will happen? You will define the trigger in the right box. Explanation: Triggers can be defined in the range with which the event is associated. Just forget the standard option and select a light red fill from the dropdown list. If you click OK now, all the cells that are above 200 will be formatted based on the given rule. Highlight cells that contain textIf you are looking for all the M types of converters in column G, you do not have to scan the screen for hours and hours. Instead, you can let conditional formatting do all the dirty work and highlight the criteria easily and automatically. Select the range with text. In this example, you will select the range G2:G24, all our ‘Product Name.’ Click Conditional Formatting, hover the mouse over Highlight Cells Rules, and choose Text that Contains. Enter “M type” in the text box. Next, select yellow fill color with dark yellow text using the dropdown menu, then click OK. Tip: You can apply a custom format if the default style is unsuitable. Use the dropdown menu and select the Custom format option to create your format. You can create custom styles by changing the font, border, or fill types. Keep in mind the basics of conditional formatting! Further options are available if you can apply different rules. You can also use important highlight rules for your values: Greater than…, Equal to…, or Between. Editing a conditional formatting ruleThis section will show you how to manage conditional formatting rules. You can modify the selected rule using the conditional formatting rules manager. Use this function if you want to edit some of these rules later or delete them. This function can be accessed using the Home Tab and the Conditional Formatting button. Then select Manage Rules from the dropdown list. By default, you’ll see a dialog box: By default, the “Show formatting rules for:” is set to “Current Selection”. Next, select the “This Worksheet” option from the dropdown list to display the conditional formatting rules you have applied to the actual Worksheet. Use topbottom rules and select the rule from the list you want to modify. Then, click the rule you want to change to edit a rule. In this example, we want to highlight the top 10 values in the Total value column. Currently, the top five are highlighted. Click the Top 5 rows! Excel highlights the selected rows with blue. Then, click Edit Rule. A dialog box opens where you can change the given conditions of the rule; type 10 in the number field. Finally, click OK. We’ll get the Manage Rules box back. Click OK to save the changes. Delete a conditional formatting ruleSometimes your spreadsheet looks like a traffic jam regarding too many conditional formatting rules. This is because Excel has a hidden “feature.” If you have many unique rules, that may be the reason for the slow calculations. In this case, you should eliminate some rules in the sheet. Tip: Excel provides a quick way to delete rules. Click the Conditional Formatting button on the Home tab and select clear rules. But it’s not smart to delete all rules from a worksheet! In this case, we would like to delete the rules from Column G (Product Names). Select the ‘G2:G24’ range. To properly delete a rule, select the ‘Manage Rules’ box and click on the conditional formatting rule you want to remove. Click OK to delete the rule. We hope you have found the first part of the tutorial interesting and exciting. In this, we have introduced how we can use the basic rules with Excel. Conditional Formatting and FormulasYou’ll find here 50+ formula examples and learn more about custom formulas. All examples are based on a few simple steps:
That’s all. Check our definitive guide with examples if you want to learn about Excel Formulas. How do I highlight the lowest 3 values in Excel?Create a formula to determine the 3 smallest values that meet specific criteria. Use a formula based on the AND and SMALL functions. In the example, the formula used for conditional formatting is:
where “city” is the named range B4:B12, and “sales” is the named range C4:C12. How to conditional format if the cell is blank?In the following example, you want to highlight values in one column when values in one or more columns are blank. A basic formula based on the OR and ISBLANK functions is used to test for blank or empty cells. For example, if any cell in a corresponding row in the range B4:E12 is blank, OR function returns TRUE. Thus, the trigger will be fired, and the cell in column F will highlight using light blue. Use the conditional formatting formula:
How to use Conditional Formatting to highlight past due dates in ExcelYou will apply a formula in the example to determine “past due dates.” The formula will check if the variance between dates is greater than a certain number of days. To create a colorcoded table, use three conditional formatting rules for each interval. Select the cells in range E4:E9 and apply the formulas.
Important: You have to use the stopiftrue checkbox for rule1 and rule2. How to highlight overlapping dates in ExcelSometimes you need to highlight cells where dates overlap. You can use conditional formatting formulas and apply the SUMPRODUCT function in the example. What are overlapping dates? We are talking about overlapping dates if these two conditions are true:
Create a new column to check the conditions. Then, apply the formula to cell F4 them copy the formula down.
Result: Now create a conditional formatting rule. First, select the cells you want to format, in this case, range C4:F8. Then use the rule below to highlight overlapping dates. =$F4=TRUE So, click OK to apply the rule. If the result is TRUE, the given row cells in the selection will be highlighted. Final thoughtFinally, take a closer look at the advanced conditional formatting rules:
Conditional formatting makes our lives in Excel a lot easier. Use formulas wisely! We can highlight all the key information that fits the criteria. Knowing and applying conditional formatting rules decrease the time spent on data analysis. Therefore, we can be a lot more productive. We can effectively support company decisions by recognizing the patterns (whether positive or negative). Look at the indepth article called ‘How to create an Excel Dashboard‘ regarding conditional formatting on our blog. What are types of conditional formatting?There are 5 types of conditional formatting visualizations available:. Background Color Shading (of cells). Foreground Color Shading (of fonts). Data Bars.. Icons (which have 4 different image types). Values.. What is conditional formatting based on?Excel's predefined conditional formatting, such as Data Bars, Color Scales and Icon Sets, are mainly purposed to format cells based on their own values. If you want to apply conditional formatting based on another cell or format an entire row based on a single cell's value, then you will need to use formulas.
What are examples of instances when you might use conditional formatting in an Excel spreadsheet?You can use Excel conditional formatting to highlight policies with dates that have expired. In this example, due dates are entered in cells B2:B7. If the date is before the current date, the date cell is formatted with red fill colour. The conditional formatting formula is shown below the screen shot.
What are the conditional formatting rules?Conditional formatting is used to change the appearance of cells in a range based on your specified conditions. The conditions are rules based on specified numerical values or matching text. Changing the appearance of cells can visually highlight interesting data points for analysis.
