DEV Community

Answer: How to highlight duplicate word in a column in spreadsheet, ignoring text case and Punctuation

Use Scripting.Dictionary to implement.

Sub How_to_highlight_duplicate_word_in_a_column_in_spreadsheet_ignoring_text_case_and_Punctuation()
    Dim cln As Range, ws As Worksheet, c As Range, cv As String, cCollection As New VBA.Collection, key, colr As Long
    Dim cDict As New Scripting.Dictionary
    'Dim cDict As Object
    'Set cDict = CreateObject("Scripting.Dictionary")
    Set ws = ActiveSheet
    Set cln = ws.UsedRange.Columns(3) 'for test

Top comments (0)