# Unique Value in a Range

#### Denny57

##### New Member
I am trying to identify the cell in a row which contains a unique but specific value or if that value is not unique then to return a zero value

Example 1 Find Value "C" (unique in range)

Range: A1:A5
Cell Values: A1=B, A2 =C, A3 =D, A4 =E & A5 =F
Find the unique cell that contains Value "C" and indicate in Cell B1 (Show cell reference eg. A2)

Example 2 Find Value "C" (Not unique in range)

Range: A1:A5
Cell Values: A1=B, A2 =C, A3 =C, A4 =E & A5 =F
Identifies that value "C" is not unique and returns "0" in Cell B1 (Show 0), if not 0 then a suitable "Not Found" indicator

If a unique specified value is identifed then I will need to use the cell refernce containing this unique value in a subsequent calculation.

Any help is greatly appreciated

### Excel Facts

Format cells as date
Select range and press Ctrl+Shift+3 to format cells as date. (Shift 3 is the # sign which sort of looks like a small calendar).

Try this:

#### mart37

##### Well-known Member
Map3
AB
1BA2
2C
3D
4E
5F
Cell Formulas
RangeFormula
B1B1=IF(COUNTIF(A1:A5,"c")=1,"A"&MATCH("C",A1:A5,0),0)

Try, if in B1=C

#### Denny57

##### New Member

Thank you for the suggestions. Unfortnately my examples were incorrect as all items I used were in the same column and should have been in the same row. The COUNTIF =1 is fine, but I need to be able to identify the unique row / column that contains the unique information and not the position within the range.

Example

Cell C123 = W, Cell D123 = X Cell E123 = Y & cell F123 = Z.

Locate and identify the cell reference which contains the unique value Y and populate this cell reference in Cell B124

Any solution should be able to be used for different ranges on the same row and the result may be applied to a different Cell. All cells, cell ranges and values are variables.

Aplogies and thanks again for many assistance

Try again:

#### Denny57

##### New Member
Try again:

Apologies but I am having difficulty understanding the syntax and what each part is doing. I need to understand so that when I apply the formula to many different ranges and target cells I am using the correct details.

Please can you clarify the relevance of B2. The range A1:A5 is a column but I am looking for a range in is row (C123:F123) in my example.

The screen print shows the range as C68:F68 and the target cell is B71, but as mentioned I need to replicate this for multiple ranges and target cells.

#### Attachments

• XL Sample.png
8.5 KB · Views: 3

Replies
1
Views
48
Replies
5
Views
134
Replies
5
Views
89
Replies
3
Views
143
Replies
10
Views
165

### Forum statistics

1,127,589
Messages
5,625,671
Members
416,125
Latest member
NeedExcelHelp2021

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back