If you want to insert formula into
C2
cell, try this:
Sheets(1).Range("C2").Formula = "=IF(ISERROR(MATCH(C" & cnt & ",C$2:C$" & lastrow & ",0)),'','Duplicate')"
After that you can read the value (calculated via formula):
retVal = Sheets(1).Range("C2").Value
Note:
retval
should be declared as string variable
Now, you can use it for further processing:
If retval = "" Then
Else
End If