VBA find excel duplicate row by multiple column value(エクセルの複数列の重複行情報取得)

Option Explicit

Public Sub DuplicateCheck()
    Dim lastRowNum As Integer
 
   'Please change your target column. This sample use B column
   lastRowNum = ActiveSheet.Cells(ActiveSheet.Rows.Count, "B").End(xlUp).Row
 
    Dim rowNum As Integer
 
    Dim ucKeyVal1 As String
    Dim ucKeyVal2 As String
 
    Dim myDictionary As Object
    Set myDictionary = CreateObject("Scripting.Dictionary")
 
    For rowNum = 2 To lastRowNum
        ucKeyVal1 = Cells(rowNum, 2).Value
        ucKeyVal2 = Cells(rowNum, 14).Value
     
        Dim dicVal As String
        dicVal = ucKeyVal1 & ucKeyVal2
     
        If myDictionary.Exists(dicVal) Then
           MsgBox (dicVal)
           Else
           '重複情報登録する
           myDictionary.Add dicVal, dicVal
        End If
    Next

    MsgBox ("Done")

End Sub