If you just want to copy instead of Move, use this code:
'Copy items in column B that are not in column A to column C
lastrow = ActiveSheet.UsedRange.Rows.Count
For i = 1 To lastrow
If Not Application.WorksheetFunction.CountIf(Range("A:A"), Range("B" & i)) = 1 Then
Range("B" & i).Copy Range("C" & i)
To use the posted code;
Start the Visual Basic Editor (via Menu Tools, Macro, Visual Basic Editor, or press ALT+F11).
On the Insert menu in the VBE, click Module. (if necessary)
In the module (the white area at the right), paste your code
Note: All Macros start with "Sub MacroName()" and End with "End Sub"
How to create a button and assign a macro to it:
If you don't already have the "Forms" toolbar active, click on Tools>Customize>Toolbars and check "Forms". The toolbar will appear on your screen
Click on the Button icon, and drag out a button on the screen. When you release the left mouse button, an "Assign Macro" dialog box will appear. Highlight whatever macro you want, and click OK. The macro will now be assigned to that button.
You can also run the code by hitting Alt-F8 and selecting the macro name and clicking Run.