Comparing duplicate values, finding MIN, conditional formatting

shiftdelete

New Member
Joined
Dec 10, 2014
Messages
9
I've tried a few methods, but I'm struggling to put them all together to get my exact scenario to work. Any help is greatly appreciated.

I have a spreadsheet that needs to search down column B (Rate), find any duplicate values (there will be 12-15 duplicate pairs)-- and compare the values of Column C (Price) between the duplicate pairs and get the smallest value. (I'm using this to do conditional formatting - changing font color so that it looks greyed out.)

See the example below-- I would like to apply the formatting to columns A, B & C to dim the font color. (or at LEAST column C.) I cannot have the entire row highlighted, because I have additional non-related data in other columns.

CouponRatePrice
2.53.2598.335
2.53.37599.032
2.53.5099.600
3.0
3.25
97.101
3.0
3.375
98.289
3.0
3.50
99.413
3.03.625100.472
3.03.75101.328
3.03.875101.923
3.04.00102.404
3.5
3.75
100.214

<tbody>
</tbody>
 

Excel Facts

Can you sort left to right?
To sort left-to-right, use the Sort dialog box. Click Options. Choose "Sort left to right"
you can use this conditional formatting rule


=IF(COUNTIF($B$2:$B$12,$B2)>1,MIN(IF($B2=$B$2:$B$12,$C$2:$C$12))=$C2,FALSE)



Excel 2013
ABC
1CouponRatePrice
22.53.2598.335
32.53.37599.032
42.53.599.6
533.2597.101
633.37598.289
733.599.413
833.625100.472
933.75101.328
1033.875101.923
1134102.404
123.53.75100.214
Sheet1
 
Last edited:
Upvote 0
Thanks VBA Geek!!

I have 1 follow-up question that is based on the same data.

I have a separate excel workbook that I am linking to this one. Column A is rate. Column B is price.

How can I pull the list of Rates & Prices, removing the MIN of any duplicates?
 
Last edited:
Upvote 0
hi, no problem.

could you post again the the tables and the desired results? you can put both tables on the same sheet for convenience
 
Upvote 0
Book1, Sheet1Book2, Sheet1
A (Rate)B (Price)A (Rate)B (Price)
3.2598.3354.00102.404
3.37599.0323.875101.923
3.599.6003.75101.328
3.25
97.101
3.625100.472
3.375
98.289
3.5099.600
3.5
99.413
3.37599.032
3.625100.4723.2598.335
3.75101.328
3.875101.923
4.00102.404
3.75
100.214

<tbody>
</tbody>
Book2,Sheet1 will externally reference Book1,Sheet1 and display a list in descending order of all Rates, taking the Max Price for any duplicate Rate Values. Does that make sense? I could have this list made on a new sheet in Book1 if it is too hard to create the formula using an external reference.
 
Upvote 0
You'd do it like this


<b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">D2</th><td style="text-align:left">{=LARGE(<font color="Blue">A$2:A$12,SUM(<font color="Red">1,COUNTIF(<font color="Green">A$2:A$12,D$1:D1</font>)</font>)</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.</td></tr></table><br />

<b>Array Formulas</b><table cellpadding="2.5px" width="100%" rules="all" style="border: 1px solid;text-align:center;background-color: #FFFFFF;border-collapse: collapse; border-color: #BBB"><thead><tr style=" background-color: #DAE7F5;color: #161120"><th width="10px">Cell</th><th style="text-align:left;padding-left:5px;">Formula</th></tr></thead><tbody><tr><th width="10px" style=" background-color: #DAE7F5;color: #161120">E2</th><td style="text-align:left">{=MAX(<font color="Blue">IF(<font color="Red">$D2=A$2:A$12,B$2:B$12</font>)</font>)}</td></tr></tbody></table><b>Entered with Ctrl+Shift+Enter.</b> If entered correctly, Excel will surround with curly braces {}.</td></tr></table><br />




Excel 2013
ABCDE
1RATEPRICERATEPRICE
23.2598.3354102.404
33.37599.0323.875101.923
43.599.63.75101.328
53.2597.1013.625100.472
63.37598.2893.599.6
73.599.4133.37599.032
83.625100.4723.2598.335
93.75101.328
103.875101.923
114102.404
123.75100.214
ACCESS
 
Upvote 0

Forum statistics

Threads
1,215,172
Messages
6,123,438
Members
449,100
Latest member
sktz

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
Back
Top