I am comparing two columns and displaying the differences in another column. I have an excel formula that works but I need to use it in a vba macro. When I try to usie it in the macro though I get the error "Run-time Error: '1004': Application-defined or object-defined error". How can this be fixed?
Sub Macro2()
Range("B2:B60").Formula = "=IF(COUNTIF($A:$A,$B2)=0, B2, "")"
End Sub