Conditional Formatting in Excel

Download as xlsx, pdf, or txt
Download as xlsx, pdf, or txt
You are on page 1of 20

Conditional Formatting in Excel

https://www.vertex42.com/blog/excel-tips/how-to-use-conditional-formatting-in-excel.html

This workbook contains some examples from the article "How to Use Conditional Formatting in Excel" by Jon Wi
file and the content and code contained within is copyrighted and should be treated like other copyrighted materi
book. To share it or reference it, link to the article using the web page address listed above, but do not distribute
within the file without permission. Thanks.

EXAMPLES

Intro to Conditional Formatting

Example: Color Scale Example: Data Bars Example: Dup


NAME SALES GRADE NUMBER
Mel 123 A 5
June 43 B 10
Chris 176 C 8
Maria 89 D 3
James 105 F 2
Will 25

Example: Icon Sets


AMOUNT BALANCE
$ 50.00 $ 550.00
-325.00 225.00
-150.00 75.00
-80.00 -5.00
150.00 145.00
600.00 745.00

TEMPLATE See it in action: Check Register Template


For examples of other ways to use Icon Sets, see the Feature Comparison Template.

TEMPLATE See it in action: Feature Comparison Template

Highlight an Overdue Date

Next
Machine
Calibration
Machine 1 5/2/2019 Conditional Formatting > Highlight Cells
Machine 2 4/15/2019 Enter =TODAY()
Machine 3 7/1/2019 Choose one of the formats from the dro
Machine 4 8/5/2019

TEMPLATE See it in action: Equipment Calibration Log

In-Cell Progress Bar


Progress: 45%

Data Bar Showing Negative and Positive

-Dx +Dx
Variable 1 20 20
Variable 2 -15 15
Variable 3 12 -12
Variable 4 -5 8
Variable 5 1 -1
Data Bars Comparing Two Groups
* Important: Make sure the Min/Max range and columns widths are the same..

Cons Value (0-10) Value (0-10) Pros


Problem 1 Benefit 1
Problem 2 Benefit 2
Problem 3 Benefit 3
Problem 4 Benefit 4
Problem 5 Benefit 5

TEMPLATE See it in action: Pros and Cons List

2017 US Population (in millions)


Age Male Female
80+ 4.79 7.65
70 to 79 9.85 11.74
60 to 69 17.49 19.34
50 to 59 21.22 22.19
40 to 49 20.14 20.48
30 to 39 21.71 21.5
20 to 29 23.25 22.24
10 to 19 21.41 20.5
Under 10 20.57 19.68

WRONG 2017 US Population (in millions)


Age Male Female
80+ 4.79 7.65
70 to 79 9.85 11.74
60 to 69 17.49 19.34
50 to 59 21.22 22.19
40 to 49 20.14 20.48
30 to 39 21.71 21.5
20 to 29 23.25 22.24
10 to 19 21.41 20.5
Under 10 20.57 19.68

2017 US Population (in millions)


Male
Age
Female
4.79
80+
7.65
9.85
70 to 79
11.74
17.49
60 to 69
19.34
21.22
50 to 59
22.19
20.14
40 to 49
20.48
21.71
30 to 39
21.5
23.25
20 to 29
22.24
21.41
10 to 19
20.5
20.57
Under 10
19.68

Control Scaling of Data Bars and Color Scales via Linked Cells
Can the Min / Max settings for a Data Bar be Linked to cells? YES

Chart Using Data Bars


72 Change a single bar color
30 Step 1: Clear the rules from the selected
40 Step 2: Copy paste from one of the othe
23 Step 3: Modify the rule/format
60

Minimum Maximum
-20 100
Highlight Every Other Row

Date Expense Amount


4/17/2019 Copy Paper 24.50
4/19/2019 Pens 12.45
4/20/2019 Printer Cartridge 58.95

Highlight an Entire Row Based on One Cell


TEMPLATE Work Breakdown Structure Template
Highlighting Dates in a Calendar
TEMPLATE Yearly Event Calendar

TEMPLATE Perpetual Calendar (yearly view)

TEMPLATE Yearly Schedule of Events (multiple colors)

Displaying a Gantt Chart


VIDEO How to Make a Gantt Chart in Excel
2
1

10 Separate Simultaneous Effects with Conditional Formatting


Default Format 1
1. Number Format 1.00
2. Font Style (Bold) 2.00
3. Font Color (Blue) 3.00
4. Font Effects (strike-through) 4.00
5. Font Underline (double) 5.00
6. Fill Color/Effects/Scale (green) 6.00
7. Fill Pattern (gray crosshatch) 7.00
8. Border Style/Color (red solid) 8.00
9. Data Bar 9.00
10. Icon Set 10.00
Modify Custom Number Formats using Conditional Formatting
See Also Custom Number Formats in Excel

Modify the Date Format

Date Format dmy Date 5/23/2019

Rule Formula =(ref="dmy")

Modify the Time Format

Time Format 24hour Time 4:34 PM

Rule Formula =(ref="24hour")

Display Decimals or Fractions

Display fraction Inches 34 512/903

Rule Formula =(ref="fraction")

Automatic Indenting

WBS Task Format Codes


1 Task
1.1 Task " "@
1.2 Task " "@
1.2.1 Task " "@
1.2.2 Task " "@

Rule Formulas =LEN($C91)-LEN(SUBSTITUTE($C91,".",""))=1


=LEN($C91)-LEN(SUBSTITUTE($C91,".",""))=2

See Also Count the number of spaces in a text string


Hide Zero Values

Value White Text "-" ""


$3.54 $3.54 $3.54 $3.54
$0.00 $0.00 $0.00 $0.00
$0.00 $0.00 $0.00 $0.00
$2.41 $2.41 $2.41 $2.41
$12.40 $12.40 $12.40 $12.40

Display Thousands, Millions, or Billions Based on Value

Shares Formats
23500000 0.0,K
9999 0.0,,M
34567898267 0.0,,,B
123

Create Your Own Icon Sets Using Unicode Characters / Emojis

$ Left Over Formats


-300.00 0* 😠
-50.00 0* 🙁
50.00 0* 🙂
260.00 0* 😃
530.00 0* 😍

Combined 3-Color Scale with Data Bars

100%
50%
25%
2%
75% Vertex42.com
REFERENCES

ARTICLE Using Unicode Characters in Excel

ARTICLE Add Cool Features to Your To Do Lists in Excel


© 2017-2020 Vertex42 LLC

ng in Excel" by Jon Wittwer. This Excel


er copyrighted material, such as a
, but do not distribute the file or content

Example: Duplicates
NAMES
Mel
June
Chris
Mel
Will
tting > Highlight Cells Rules > Less Than…

formats from the dropdown and click on OK


ed Cells

ules from the selected cell


e from one of the others (uses the same settings)
rule/format
matting
matting
Project Schedule
Project Start: Tue, 1/1/2019 Week 1 Week 2 Week 3 Week 5 Week 6
Today: Wed, 1/9/2019 Dec 31, 2018 Jan 7, 2019 Jan 14, 2019 Jan 21, 2019 Jan 28, 2019
31 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 1 2 3

TASK START END M T W T F S S M T W T F S S M T W T F S S M T W T F S S M T W T F S S

Task 1 1/1/19 1/4/19


Task 2 1/5/19 1/7/19
Task 3 1/8/19 1/12/19
Task 4 1/13/19 1/18/19
Task 5 1/6/19 1/8/19
Task 6 1/6/19 1/6/19

Insert new rows ABOVE this one

You might also like