0% found this document useful (0 votes)
36 views

Excel Conditional Formatting

Excel conditional formatting can be used to hide duplicate values in a sorted list, highlight duplicate entries in a column, highlight items that match a list, and highlight lottery numbers that were drawn or upcoming expiration dates. Various conditional formatting rules and formulas are demonstrated and explained for accomplishing these tasks using relative cell references and functions like COUNTIF, TODAY, and AND.

Uploaded by

c.shajid
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
36 views

Excel Conditional Formatting

Excel conditional formatting can be used to hide duplicate values in a sorted list, highlight duplicate entries in a column, highlight items that match a list, and highlight lottery numbers that were drawn or upcoming expiration dates. Various conditional formatting rules and formulas are demonstrated and explained for accomplishing these tasks using relative cell references and functions like COUNTIF, TODAY, and AND.

Uploaded by

c.shajid
Copyright
© Attribution Non-Commercial (BY-NC)
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

Excel Conditional Formatting

Hide Duplicate Values


In a table, each row should have all data entered, to enable sorting and filtering. However, you
can use Excel conditional formatting to hide the duplicate values, and make the list easier to read.
In this example, when the table is sorted by Region, the second (and subsequent) occurences of
each region name will have white font colour.

In Excel 2007:
1. Select range A2:A5
2. On the Ribbon, go to the Home tab and click Conditional Formatting
3. Click New Rule
4. Click Use a Formula to Determine Which Cells to Format
5. For the formula, enter
=A2=A1
6. Click the Format button.
7. Select a font colour to match the cell colour.
8. Click OK, click OK

Highlight Duplicates in Column

Use Excel conditional formatting to highlight duplicate entries in a column:

1. Select range A2:A11


2. Choose Format|Conditional Formatting
3. From the first dropdown, choose Formula Is
4. For the formula, enter
=COUNTIF($A$2:$A$11,A2)>1
5. Click the Format button.
6. Select a font colour for highlighting.
7. Click OK, click OK

Highlight Items in a List

Use Excel conditional formatting to highlight items that are in a list on the
worksheet.:

1. Create a list of items you want to highlight. If the items are on a different
sheet than the conditional formatting, name the list.
2. Select range A2:A7
3. Choose Format|Conditional Formatting
4. From the first dropdown, choose Formula Is
5. For the formula, enter
=COUNTIF($C$2:$C$4,A2) 
or, if the list is named, use the name in the formula:
=COUNTIF(CodeList,A2) 
6. Click the Format button.
7. Select a font colour for highlighting.
8. Click OK, click OK

Highlight Lottery Numbers

You can use Excel conditional formatting to highlight the ticket numbers that
have been drawn in a lottery. In this example the ticket numbers are in cells
B2:G4, and the drawn numbers are entered in cells B6:G6

1. Select cells B2:G4


2. Choose Format|Conditional Formatting
3. From the first dropdown, choose Formula Is
4. For the formula, use the CountIf function:
   =COUNTIF($B$6:$G$6,B2)
5. Click the Format button.
6. Select formatting options (green pattern, in this example), click OK
7. Click OK

Highlight Upcoming Expiry Dates

You can use Excel conditional formatting to highlight payments that are due in
the next thirty days. In this example, Due dates are entered in cells A2:A4.

1. Select cells A2:A4


2. Choose Format|Conditional Formatting
3. From the first dropdown, choose Formula Is
4. For the formula, use the Today function to count the days:
   =AND(A2-TODAY()>=0,A2-TODAY()<=30)
5. Click the Format button.
6. Select formatting options (Bold, Blue font, in this example), click OK
7. Click OK

You might also like