Вы находитесь на странице: 1из 10

Ex.

No
Date

CONDITIONAL FORMATTING IN EXCEL

Aim:
To learn about conditional formatting and its options in Excel
Introduction:
Conditional Formatting Definition:
Conditional Formatting in Excel is a very powerful tool. With conditional
formatting, you can select one or more cells, and create rules (conditions)
for when and how those cells are formatted. The conditions can be, based
on the selected cell's contents, or based on the contents of another cell.
You can control the following formats:
Number format
Font, font style, and font colour (but not font size)
Fill colour and fill pattern
Border colour and border style (but not border thickness)
If the rules (conditions) that you specified are met, then the formatting is
applied. Conditional Formatting is easy to use and provides a lot of options
to users.
Why Conditional Formatting?
Most of us would have come across a situation where our managers would
have asked:

Who are the top 3 and the bottom 3 salespersons for this quarter?
Name our 10 top selling products this year?
Can you compare the performance of this year to the performance
of the previous year and tell us which year has been better for us?
Can you highlight the no. of customers for this particular product?

This information is important for any organization. But have you ever
wondered, how difficult it is to arrive at this information from simple excel
data files? If our dataset is small going through it once will still help us
gather this information or perhaps other important information. But what if
our dataset is large and has more than hundreds of records? What if the
organizations requirement is to get this information quickly without
wasting much time? Excel Charts alone dont always suffice the purpose.
There has to be a mechanism to highlight the important information as per
our criteria. Conditional Formatting can solve our problem. With
conditional formatting we can highlight important cells in our excel
sheet/table or make important information stand out based on our criteria.
Conditional Formatting can be applied to cells, charts and tables.

Procedure:
Conditional Formatting Using Highlight Cell Rules(Greater than
and Less than) Option
Dataset: SG&A Variance to Forecast
DeptID
100
101
102
200
202
206
301
305
400
410
420

Department
Corporate
Accounting
HR
Operations
Research
Manufacturing
Sales
Marketing
Logistics
IT
Warehouse

Actual
$187,274
$61,456
$88,133
$167,209
$116,801
$175,202
$169,975
$212,012
$172,371
$92,749
$57,845

Forecast
$175,000
$60,000
$90,000
$150,000
$125,000
$165,000
$125,000
$185,000
$200,000
$100,000
$75,000

Variance
-7.01%
-2.43%
2.07%
-11.47%
6.56%
-6.18%
-35.98%
-14.60%
13.81%
7.25%
22.87%

Q1: Highlight all variances greater than +10% with Green Fill with
Dark Green Text
Step 1: First Select the Variance Column F11:F21

Step 2: Go to Home->Styles->Conditional Formatting->Highlight


Cell Rules->Greater Than

Step 3: Enter 10% with Green Fill with Dark Green Text and Click
Ok

The Cells are highlighted with Green Fill with Dark Green Text which has
greater than +10%

Q2: Highlight all variances less than -10% with red Light Red Fill
with Dark Red Text
Step 1: First Select the Variance Column F11:F21

Step 2: Go to Home->Styles->Conditional Formatting->Highlight


Cell Rules->Less Than

Step 3: Enter -10% with Light Red Fill with Dark Red Text and
Click Ok

The Cells are highlighted with Light Red Fill with Dark Red Text
which has less than -10%

Conditional Formatting using Highlight Cells Rules (Duplicate


Values) Option
Dataset: Check Information
CkNum
4752
4753
4754
4755
4753
4757
4758
4759
4760
4761
4762
4758

VID
SSC201
TNK900
MER332
TME400
TNK900
TRI002
MOR300
SMI331
SSP204
SMI333
MER333
MOR300

Date
9/12/2012
9/19/2012
9/26/2012
10/3/2012
9/19/2012
10/17/2012
10/24/2012
10/31/2012
11/7/2012
11/14/2012
11/21/2012
10/24/2012

Amount
$1,460
$645
$772
$469
$645
$489
$1,692
$239
$880
$347
$718
$1,692

Q1: Highlight the duplicate checks in VID with Light Red Fill with
Dark Red Text
Step 1: First Select the VID Column E11:E22

Step 2: Go to Home->Styles->Conditional Formatting->Highlight


Cell Rules->Duplicate Values

Step 3: Click Ok

The Duplicate Cells are highlighted with Light Red Fill with Dark
Red Text

Q2: Highlight the Unique Values in VID with Green Fill with Dark
Green Text
Step 1: First Select the VID Column E11:E22

Step 2: Go to Home->Styles->Conditional Formatting->Highlight


Cell Rules->Duplicate Values

Step 3: Change the Values to Unique and Green Fill with Dark
Green Text

The Unique Cells are highlighted with Green Fill with Dark Green
Text

Case Study
1. Inventory Turnover
Item
AB101
XY200
CG231
HA882
ZZ750
LL002
PY552
JJ120
JA221
RJ061

Turnove
r
12.5
20.1
8.2
1.1
2.1
3.6
10.9
18.2
11.7
5.2

Q1: Conditional Format the Turnover column (Top 3) with Green


Fill with Dark Green Text
Q2: Conditional Format the Turnover column (Bottom 3) with Light
Red Fill with Dark Red Text
2. Inventory Turnover
Item
AB101
XY200
CG231
HA882
ZZ750
LL002
PY552

Turnove
r
12.5
20.1
8.2
1.1
2.1
3.6
10.9

JJ120
JA221
RJ061

18.2
11.7
5.2

Q1: Use a custom formula to conditional format the Item Column


where Turnover is greater than 15

Result:

Вам также может понравиться