Case Sensitive removal of duplicates in VBA

awsumchillicrab

Board Regular
Joined
Jan 30, 2011
Messages
56
Hi all,

In removing duplicates with case-sensitivity, I can't use a COUNTIF so the substitute for counting is this formula entered with Ctrl-Shift-Enter:

=SUMPRODUCT(--EXACT($D$13:$D$16,D15))

Now I want to incorporate this into VBA, so that I can include the .delete method. How do I do it?

For starters, VBA doesn't seem to have WorksheetFunction.Exact
 
If you were really desparate to use that function, you'd have to use vba to write the formula to a free column, filter it for results above 1, delete the visible rows then delete the temporary formulas.
 
Upvote 0

Excel Facts

Links? Where??
If Excel says you have links but you can't find them, go to Formulas, Name Manager. Look for old links to dead workbooks & delete.
If you are still looking for help, can you tell us just what you have in your sheet, where it is and what you are trying to achieve?

What version of Excel are you using?
 
Upvote 0
Excel 2007.

I was just treating it as an academic exercise, when I realized that COUNTIF doesn't do case sensitivity.

Thanks for the solution Weaver.
 
Upvote 0

Forum statistics

Threads
1,224,603
Messages
6,179,849
Members
452,948
Latest member
UsmanAli786

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