I want to have a cell highlighted green if the next cell is greater than the current cell. This formatting should apply for an entire column. E.g. if A2 > B2 then A2 should become green. If A3 > B3 then A3 should become green, and so on. Note: I want to not have this done by individual formatting, but by a general rule. 1
There will be times when you would want to format cell or column based on another column's value. Maybe this is that time for you. That's why you are here. Anyway, this can be done easily in excel. Let's learn how to format cells based on another column's value with the help of an example.
To do so, follow these steps.
=$D2>$C2 And it's done. All the values in sales 2019 that are greater than the sales in 2018 are highlighted with green fill. How does it work? It is easy. First, we select the range on which we want the formula to apply. Next, we use a formula to determine which cell to format in the selected range. The formula is $D2>$C2. Here we have locked columns and allowed rows to change. This is called half absolute referencing. Now, D2 is compared with C2, since D2 is greater than C2, D2 is filled with green colour. Same happens with each cell. If you wanted to highlight months on instead of sales in 2019, you can directly change "formula applies to" to the range A2:A12.
So yeah guys, this how can do conditional formatting in excel based on another column. This sounds tricky but in practice, it is quite easy. You just need to work around a little bit. I hope this article was explanatory enough to help you out on conditional formatting in excel. You have any doubt, mention it in the comments section below. Related Articles: Expanding References in Excel Relative and Absolute Reference in Excel Shortcut To Toggle Between Absolute and Relative References in Excel Dynamic Worksheet Reference All About Named Ranges In Excel Total number of rows in range in excel Dynamic Named Ranges in Excel Popular Articles: 50 Excel Shortcut’s to Increase Your Productivity The VLOOKUP Function in Excel COUNTIF in Excel 2016 How to Use SUMIF Function in Excel
Have you ever tried to apply conditional formatting to a column based on values in a separate column in Excel? This tutorial will guide you how to solve the problem. Apply conditional formatting based on values in another column Apply conditional formatting based on values in another columnSupposing you have a table as the below screenshot shown, and want to highlight cells in column B if the adjacent cell values in column C are greater than 800, please apply the Conditional Formatting function as follows. 1. Select the column cells you will highlight (here I select range B2:B13), and then click Home > Conditional Formatting > New Rule. 2. In the New Formatting Rule dialog box, please configure as follows.
Note: In the formula, $C2 is the first cell of the column that contains the criteria you need, and >800 is the criteria you will highlight cells based on. Please change them to meet your needs. You can see cells in column B are highlighted by certain fill color if the adjacent cells in column C are more than 800. Related articles
Conditional format dates less than/greater than today in Excel Ignore blank or zero cells in conditional formatting in Excel Highlight cells based on length of text in Excel Apply conditional formatting search for multiple words in Excel More tutorials for Conditional Formatting… |