## How to highlight unique distinct values

The image above shows conditional formatting highlighting unique distinct values, duplicates are not highlighted.

Conditional Formatting Formula:

The COUNTIF function counts the value in cell B3 in cell range $B$3:B3 and if it is equal to 1 the formula returns TRUE and that will highlight the cell.

$B$3:B3 is an expanding cell range, the first part of the cell reference is locked to B3 and the second part changes as the CF formula is applied to cells below.

Use the dollar sign $ to lock a cell reference, if you put it in front of the column letter then the column is locked. The same thing happens if you put it in front of the row number.

### How to apply conditional formatting to a cell range

- Select cell range.
- Go to tab "Home"
- Press with left mouse button on "Conditional Formatting" button.
- Press with left mouse button on "New Rule..."

- Select "Use a formula to determine which cells to format"
- Type the formula above in field "Format values where this formula is true:"
- Press with left mouse button on "Format" button, then pick a formatting.
- Press with left mouse button on OK button.
- Press with left mouse button on OK button.

### Get Excel *.xlsx file

Highlight overlapping date ranges using conditional formatting

The image above demonstrates a conditional formatting formula that colors a record if there is at least one record that […]

Count Conditionally Formatted cells

This article explains how to count cells highlighted with Conditional Formatting (CF). The image above shows data in cell range […]

Highlight records based on overlapping date ranges and a condition

adam asks: Hi, I have a situation where I want to count if this value is duplicate and if it […]

Highlight dates in a date range

Question: How do I highlight dates that meet criteria using conditional formatting? Table of contents Highlight values in a column […]

This post demonstrates how to highlight records with the closest value to a criterion, you can also choose to highlight […]

### 3 Responses to “How to highlight unique distinct values”

### Leave a Reply to Oscar

### How to comment

**How to add a formula to your comment**

<code>Insert your formula here.</code>

**Convert less than and larger than signs**

Use html character entities instead of less than and larger than signs.

< becomes < and > becomes >

**How to add VBA code to your comment**

[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

**How to add a picture to your comment:**

Upload picture to postimage.org or imgur

Paste image link to your comment.

**Contact Oscar**

You can contact me through this contact form

Zen Archery

In his book Wonders of Numbers (Oxford: Oxford University Press, 2001), pp. 275-276, Clifford Pickover posed a "Zen Archery" problem. In its simplest form, there is a target with 24 numbers on it. The archer must shoot 5 arrows at the target and hit numbers adding up to 200. The 24 numbers on the target are

97,101,139,41,37,31,29,89,23,19,8,13,

131,19,73,97,19,139,79,67,61,17,113,127

Pickover posed a similar problem at Archery by the Numbers. This is really a combinatorial problem -- given the 24 numbers taken 5 at a time, which unique combinations add up to 200?

There is some quick and dirty Java code on the Web, associated with Pickover's book, which solves the Zen archery problem for the 24 numbers given. However, it is not exactly a model of good programming, and it even assumes some foreknowledge of the answer in the code, i.e. the fact that all combinations adding up to 200 include the number 8.

Zen Archery

In his book Wonders of Numbers (Oxford: Oxford University Press, 2001), pp. 275-276, Clifford Pickover posed a "Zen Archery" problem. In its simplest form, there is a target with 24 numbers on it. The archer must shoot 5 arrows at the target and hit numbers adding up to 200. The 24 numbers on the target are

97,101,139,41,37,31,29,89,23,19,8,13,

131,19,73,97,19,139,79,67,61,17,113,127

Pickover posed a similar problem at Archery by the Numbers. This is really a combinatorial problem -- given the 24 numbers taken 5 at a time, which unique combinations add up to 200?

There is some quick and dirty Java code on the Web, associated with Pickover's book, which solves the Zen archery problem for the 24 numbers given. However, it is not exactly a model of good programming, and it even assumes some foreknowledge of the answer in the code, i.e. the fact that all combinations adding up to 200 include the number 8. Zen Archery

In his book Wonders of Numbers (Oxford: Oxford University Press, 2001), pp. 275-276, Clifford Pickover posed a "Zen Archery" problem. In its simplest form, there is a target with 24 numbers on it. The archer must shoot 5 arrows at the target and hit numbers adding up to 200. The 24 numbers on the target are

97,101,139,41,37,31,29,89,23,19,8,13,

131,19,73,97,19,139,79,67,61,17,113,127

Pickover posed a similar problem at Archery by the Numbers. This is really a combinatorial problem -- given the 24 numbers taken 5 at a time, which unique combinations add up to 200?

There is some quick and dirty Java code on the Web, associated with Pickover's book, which solves the Zen archery problem for the 24 numbers given. However, it is not exactly a model of good programming, and it even assumes some foreknowledge of the answer in the code, i.e. the fact that all combinations adding up to 200 include the number 8. the result is 27 groups of 5 number, the optimal combination how can I do that in excel 2003

or do pivot table on the list it is much faster and easier

Rona,

you are right! Sometimes you just want to examine the values having duplicates and then take the appropriate actions.