VBA Find Duplicates in Range to 2 Decimal Places and Highlight Both

klight20

New Member
Joined
Jul 19, 2012
Messages
4
Hello!

I have a range of data C:BV filled with numerical values to the 5th decimal place.

I would like a macro that finds duplicates in each column to the 2nd decimal place. So if I have 72.35854 and in the same column 72.35337, I want those to count as duplicates because they match to the second decimal. But I still want the numbers to the 5th decimal place to be shown.

Then I want to them both to be highlighted.

When I search, I find a code for highlighting duplicates, but not according to a decimal place. Can it be done?

Thanks in advance!
 

Excel Facts

Using Function Arguments with nested formulas
If writing INDEX in Func. Arguments, type MATCH(. Use the mouse to click inside MATCH in the formula bar. Dialog switches to MATCH.
Hi klight,
what code did you find? Adding some FLOOR() comparison to it should do the trick, so please post your code here, so someone can show you how to change it. Please, do put your code in [CODE][/CODE] brackets.
Cheers,
Koen
 
Upvote 0

Forum statistics

Threads
1,214,832
Messages
6,121,847
Members
449,051
Latest member
excelquestion515

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