You will need to insert the custom function into your workbook as follows
- Open your workbook
- Press ALT-F11 to open the VB Editor
- Right-click on the VBAProject for your workbook in the Project Explorer (left hand panel by default) and click Insert -> Module
- Paste the custom function code into the main panel
Note that the function will only be available within the workbook to which you copy the code to.