The following macro code, which functions, finds the same value in the AB two column and stores it in column C.
Sub Mysubsearch ()
Dim I as Integer
Dim C as Range
For i = 2 to Sheet1. [B65536]. End (Xlup). Row
For each C in Sheet1.range ("A2:a" & sheet1.[ A65536]. End (Xlup). Row)
If Cells (i, 2). Value = C Then Cells (I, 2). Font.ColorIndex = 3
If Cells (i, 2). Font.ColorIndex = 3 Then _
Cells (sheet1.[ C65536]. End (Xlup). Row + 1, 3). Value = Cells (i, 2). Value
MsgBox "All duplicate numbers have been identified, please check the results!"