Get Even More Visitors To Your Blog, Upgrade To A Business Listing >>

Conditional Formatting in Excel

Conditional Formatting in Excel

Table of Contents

  • Conditional Formatting with Formulas
  • How to apply Conditional formatting using GUI of excel
  • How to use the Conditional Formatting Rule?

Conditional Formatting in Excel (with Formulas)

Conditional Formatting is a feature in excel spreadsheet that allows you to apply specific formatting to cells/range that meet the specified criteria/condition. Mostly formatting rule is used as color-based formatting to highlight or distinguish among data and information stored in an excel sheet.

  • Conditional formatting formula provides the functionality to highlight cells with a certain colour, depending on the cell’s value or specific condition.
  • It is a fantastic way to quickly visualize data in an excel sheet. By conditional formatting rules in Excel, you can highlight data with provided criteria.
  • It allows you to visually analyze your data, based on a large number of condition types,
    • Greater than, Less than, Between
    • Above / Below Average
    • Top / Bottom 10
    • Top / Bottom 10%
    • Duplicates / Unique
    • Dates – Dynamic or a fix date range
    • Text containing

How to apply Conditional formatting in excel.

It will highlight the Cell A1 with red colour if the value in A1 cell will be 1.

  • Start Excel, and then open a new Excel worksheet.
  • In the Excel worksheet, select any cell A1.

conditional formatting 1

  • Click Conditional Formatting in Excel Styles group, and then click New Rule.

conditional formatting 1-1

  • Click Use a formula to determine which cells to format under Select a Rule Type.

conditional formatting 1-2

  • Click inside the Format values where this formula is true Then, select the cell that you want to use for the conditional formatting in excel.

conditional formatting 1-3

  • Modify the value in step 6 to be =$A$1=1.

conditional formatting 1-4

  • Click Format.

conditional formatting 1-5

  • In the Format Cells dialogue box, click the Fill

conditional formatting 1-6

  • Click the color “red,” and then click OK.

conditional formatting 1-7

  • In the New Formatting Rule dialogue box, click OK.

conditional formatting 1-8

  • In cell A1, type 1, and then press ENTER.
  • Verify that the color of the cell B1 changed to red.

conditional formatting 1-9

  • Close the Excel worksheet.

How to use the Conditional Formatting Excel Rule?

Let understand the working with simple examples.

Conditional Formatting Example #1

Highlight the data that is greater than 30.

Choose Highlight Cells Rules > Greater Than

conditional formatting example 1

Enter the number.

conditional formatting example 1-1

Below is the result:

conditional formatting example 1-2

Example #2

Highlight the data with duplicate values.

Choose Highlight Cells Rules > Duplicate Values

conditional formatting example 2

Click on Duplicate and OK

conditional formatting example 2-1

The result will be:

conditional formatting example 2-2

Conditional Formatting Example #3

Apart from simple rules like greater than and duplicates, there are others like “A Date Occurring…”. This condition is based on dates. Many conditions will have sub-conditions. This is one such example.

Here, we will select all the dates and apply the conditional format.

conditional formatting example 3

Choose Highlight Cells Rules > A Data Occurring

conditional formatting example 3-1

Within this dialogue box, there are many date – related options available.

conditional formatting example 3-2

We will use ‘This Week’ as we want to highlight all the dates that fall in the current week. Likewise, you can use any other setting, as needed.

conditional formatting example 3-3

So the result will be:

conditional formatting example 3-4

Conditional Formatting Example #4

Here we have a given data set of date and count and we have to apply the multiple formatting rule.

conditional formatting example 4

First, we highlight the cell value that is between 31 and 43.

conditional formatting example 4-1

conditional formatting example 4-2

Select color yellow fill with Dark yellow text.

conditional formatting example 4-3

The Result will be:

conditional formatting example 4-4

And then apply another formatting on cells who have less than 0 value with color of Light Red Fill with Dark Red Text.

conditional formatting example 4-5

And the Final Result will look like this:

conditional formatting example 4-6

Example #5

You can use Data bars color scale and icon sets for conditional formatting in Excel.

First, we will use Data bars.

Go to Data Bars > Select Blue Data Bar

conditional formatting example 5

Now, we will use Color Scales.

Go to Color Scales > Select any Color you want to.

conditional formatting example 5-1

Now, we will use Icon Sets.

Go to Icon Sets > Select any icon you want to.

conditional formatting example 5-2

Finally, the table will look like this

conditional formatting example 5-3

Conditional Formatting can be used in VBA

We can apply the formatting rule using VBA here is the example as follows:

Sub Example()
ThisWorkbook.Worksheets(1).Range(“A1”).Select
With ThisWorkbook.Worksheets(1).Range(“B1″)
.FormatConditions.Delete
.FormatConditions.Add Type:=xlExpression, _
Formula1:=”=A1=1”
.FormatConditions(1).Interior.ColorIndex = 46
End With
End Sub

You can download this Conditional Formatting template here – Conditional Formatting Excel Template

Recommended Articles

This has been a guide to Conditional Formatting in Excel. Here we discuss how to use Conditional Formatting formula along with excel example and downloadable excel templates. You may also look at these useful functions in excel –

  • Convert Numbers to Text in Excel
  • Paste Special in Excel
  • MS Excel Training Course Online
  • Column Chart in excel

The post Conditional Formatting in Excel appeared first on Learn Investment Banking: Financial Modeling Training Courses Online.



This post first appeared on Free Investment Banking Tutorials |WallStreetMojo, please read the originial post: here

Share the post

Conditional Formatting in Excel

×

Subscribe to Free Investment Banking Tutorials |wallstreetmojo

Get updates delivered right to your inbox!

Thank you for your subscription

×