Find a duplicate value in a specific location in a Data Table

Al Del

Board Regular
Joined
Jan 9, 2007
Messages
112
I have a Data Table, at times there will be duplicate values. I want to conditionally format a specific value defined by the horizontal and vertical heading values. Example

12345
203132333435
21424344434445
22515243445455
23616263434465
247172737475

<tbody>
</tbody>

I enter the horizontal and vertical coordinates.
Horizontal row heading value = 22 (cell O51)
Vertical column heading value = 3 (cell O52)

Using a formula similar to this I find the value at that coordinate.
=INDEX($H$57:R$84, MATCH(O51, $G$57:$G$84, 1), MATCH(O52, $H$56:$R$56, 1))

My problem is I want to conditionally format the cell with a border and color, but if I have duplicate values all three values, 4344, are formatted. In this example I want to only format the cell at the intersection of row 22 and column 3.
 

Some videos you may like

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest

Andrew Poulsom

MrExcel MVP
Joined
Jul 21, 2002
Messages
73,092
Conditional Formatting formula applied to H57:L61:

=(INDEX($G$57:$G$61,ROW(H57)-ROW(H$56))=$O$51)*(INDEX($H$56:$L$56,COLUMN(H57)-COLUMN($G57))=$O$52)
 

Al Del

Board Regular
Joined
Jan 9, 2007
Messages
112
Thanks Andrew, works great. I had another question relating to the same data table, but I will create a separate post for that.
 

Watch MrExcel Video

Forum statistics

Threads
1,122,600
Messages
5,597,113
Members
414,125
Latest member
iQQ

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.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

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

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

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
Top