You'd want to either copy the code and include it in a Worksheet_Change() event, or a Worksheet_Calculate() event, or just call the macro from one of those events, if you have other code in them already.
The reason I say either or is because it depends on how the value is being changed. If it's by manual entry, _Change() should work; if by a formula, you'll probably have to end up using _Calculate().
Press Alt-F11 to open the VBE.
Press Control-R to open the Project Explorer. (May be open already)
Click "Microsoft Excel Objects" for the file you're working on (should expand the list of the ThisWorkbook module and any sheet modules.)
For ThisWorkbook and sheet modules:
Double-click the ThisWorkbook module or the sheet this code applies to.
Select Workbook, Change or Calculate from the dropdowns.
Put your code in the right-hand window.
Press Alt-Q to close the VBE and return to Excel.