Well unfortunately Excel does not yet have a Conditional Formatting feature that we can apply to charts. I have great news though. There is a way that we can do it, and it is not difficult.

This blog post will look at two examples of Conditional Formatting with charts so that you get a feel for how to do it. You can then apply the same technique to whatever example you need.

In the first example shown in the image below. We want to be able to highlight the column in each chart that corresponds to the product type selected by the user in cell B3.

To achieve this we first need to add a column to the table which will show the value if the product type is selected by the user, but show the #N/A error if it is not.

The IF function is used to perform this logical test and required actions. The NA() function is used to return the #N/A error if it is not the product type selected. This is done because the chart will not plot error values, so it essentially hides those values on the chart.

The formula below is the one entered into cell C4. It compares the product name against the one selected by the user in B3 of the *Sales By Product* worksheet. It then displays the value in cell B4 if it is a match, or shows the error value if not.

=IF(A4='Sales By Product'!$B$3,B4,NA())

In this example, Music & Sound has been selected by the user.

This data range can then be selected to create a chart. In this example we create a column chart.

Select range A4:C10 and click **Insert** > **Column Chart** and select the 2-D Clustered Column. It should look like below.

The error values are hidden and only the column for the selected product type is displayed.

Double click on the conditionally highlighted column (the orange Music & Sound) and edit the **Series Overlap** to say **100%**.

And our work is done. Continue to apply any further formatting that you think improves the chart.

In this example, we look at highlighting only the columns where the value represents and increase from last year, or last weeks data.

As you saw in the previous example, it is all about the IF function. We use a logical function like IF to perform the conditional test and only show the value if relevant.

Once we have this, we repeat the same chart technique as before to overlap the data series.

The formula below has been entered into cell C4. It compares the sale of this year (B4) against last years sales of the same product. Because the lists are in order largest to smallest by sales value, a VLOOKUP function is used to return the correct sales value.

=IF(B4>=VLOOKUP(A4,$E$4:$F$10,2,FALSE),B4,NA())

The end result looks like below showing only two products have increased sales since last year, or last week.

With this amazing technique you can apply any Conditional Formatting to charts in Excel. All the power comes from the logical function in the table.

Other typical examples might include highlighting actuals against target values, or the max and min values of a chart.

Two Essential Conditional Formatting Tricks You Need to Know

]]>The Match function will be used to compare both lists and will return if a record is found or is missing. The Match function returns the relative position of an item in a list. If it cannot find the item it will return the #N/A error message (learn more about the Match function).

- Select the range of cells in the list you want to format.
- Click the
**Conditional Formatting**button on the**Home**tab of the Ribbon and select**New Rule**from the list. - Click the
**Use a formula to determine which cells to format**option and enter the formula below in the box provided.

Because we are applying the Conditional Formatting to the entire row, the dollar signs are important to fix different elements of the cell references.

- Click the
**Format**button and select the formatting of your choice. - Click
**Ok**

Instead of highlighting the duplicate items when we compare two lists, this function can be altered slightly to highlight the items that are unique to the first list.

Follow the steps as before but use the formula below for the Conditional Formatting rule.

The ISNA function is used to return true if the #N/A error message is returned. Because #N/A is returned if the Match function cannot find a record, this formula identifies the missing items in a list.

This tutorial looks at the two most requested Conditional Formatting tricks asked by Conditional Formatting enthusiasts.

Formatting a cell is great, but what if your data is many columns wide. Applying Conditional Formatting to the entire row will be far more effective in spreadsheets that have many columns.

For example, in the spreadsheet below I want to format the entire row where the exam grade is 75% or higher.

- Select the entire table of data excluding the header row.
- Click the
**Home**tab on the Ribbon and then the**Conditional Formatting**button. - Select
**New Rule**from the list. - Click on
**Use a formula to determine which cells to format**in the top half of the screen. - Enter the required formula in the
**Format values where this formula is true**box.

The IF function give us the ability to reference a different cell to the one being formatted. The mixed reference (column is fixed, but row is relative) of $B2 is used to check down column B, but not across the columns.

=IF($B2>=75%, TRUE, FALSE)

- Click the
**Format**button and choose the formatting you would like to apply. - Click
**Ok**.

The Conditional Formatting tool makes it easy to set up simple conditional rules. These may be OK for most of your needs. The second of our essential Conditional Formatting tricks takes things a step further and uses multiple conditions for a rule.

To use multiple conditions in Conditional Formatting you will need to enter a formula. Depending on the logic you want to use this will likely be either the AND or OR function. These functions can handle as many as 255 conditions. I think that should be enough J (Find out more on the AND and OR functions in Excel).

For example, I would like to format the entire row if the exam grade is 75% or higher and the coursework grade is 80% or higher.

- Select the range of cells you want to apply the Conditional Formatting to. In this case A2:C10.
- Click the
**Home**tab on the Ribbon and then the**Conditional Formatting**button. - Select
**New Rule**from the list. - Click on
**Use a formula to determine which cells to format**in the top half of the screen. - Enter the required formula in the
**Format values where this formula is true**box.

The formula below uses the AND function to ensure that both conditions are met.

=AND($B2>=75%,$C2>=80%)

- Click the
**Format**button and choose the formatting you would like to apply. - Click
**Ok**.

There is no limit to how complex this criteria may be. Conditional Formatting rules can be created to meet your needs whatever they may be, you just need to know the formulas you need to use.

- Highlight dates over 30 days old
- Managing Conditional Formatting rules
- Highlight Saturday and Sunday in a list

Please share your own favourite Conditional Formatting tricks by commenting on this post below.

]]>It may have been a while since you worked on this worksheet and you are not sure which cells are locked and which are not. You need a fast method of locating the locked cells. Let’s use Conditional Formatting to highlight the cells that are already locked so they are easy to identify.

- Select the range of cells you want to check
- Click the
**Conditional Formatting**button on the**Home**tab and select**New Rule**from the list - Select
**Use a formula to determine which cells to format** - Enter
*=IF(CELL(“protect”,A1)=1,TRUE,FALSE)*in the box provided

To identify the locked cells on a worksheet we can use the Cell function. The Cell function returns information about a cell, in this case whether it is protected. A1 represents the first cell in the selected range.

- Click the
**Format**button and choose the formatting you want to apply - Click
**Ok**

All cells that are locked will be highlighted making them easy to identify.

Protect your Formulas on an Excel Worksheet

Apply Conditional Formatting in Excel

Because they wish to highlight the cell, Conditional Formatting will be used. A new rule will be created with criteria to find those dates older than 30 days.

- Select the cells containing the dates you want to format
- Click the
**Conditional Formatting**button on the**Home**tab of the Ribbon and select**New Rule**from the list - Select
**Format only cells that contain**as the rule type - Choose
**Cell Value**from the first list and**less than**from the second list in the rule description - Enter the formula
*=today()-30*in the next box. This formula uses the Today function to find the current date and then subtracts 30 days from it

- Click the
**Format**button and choose the formatting you wish to apply - Click
**Ok**

All dates older than 30 days are highlighted with the formatting you chose.

Conditional Formatting is an extremely useful feature of Excel. Check out more Conditional Formatting tutorials below.

Learn Conditional Formatting in Excel

Highlight Saturday and Sunday in a list

A user had a list of dates and she wanted to highlight each Saturday and Sunday in the list so that they would be instantly recognisable. It also creates and nice effect by splitting each week into blocks.

**Create the Conditional Formatting Rule**

- Select the cells containing the dates
- Click the
**Conditional Formatting**button on the**Home**tab - Click
**New Rule**in the list - Select
**Use a formula to determine which cells to format**from the top half of the window - In the
**Format values where this formula is true**box, enter the formula below

=OR(WEEKDAY(A2,2)=6,WEEKDAY(A2,2)=7)

- Click the
**Format**button and select the formatting you want to use to identify the weekend days - Click
**Ok**

**Understanding the Formula**

The OR function is used to test the two conditions and evaluate the answer to true or false. The two conditions are:

- Is this date a Saturday – WEEKDAY(A2,2)=6
- Is this date a Sunday – WEEKDAY(A2,2)=7

The Weekday function is used to return the number that represents the day of the week for a date. The Weekday function requires two items of information.

**Serial Number** – The date you want to return the day of the week for. Cell A2 was used in the formula above

**Return Type** – A number that determines what day of the week a week begins. Number 2 was used in the formula above to determine that a week begins on a Monday and ends on a Sunday. Therefore Saturday is the sixth day and Sunday is the seventh of the week.