You probably have the function in the worksheet code. You need to add a
module and put the function in that. To add a module right click the workbook
in the project explorer window in the VB editor and select add module.
Functions in sheets are only available to the sheet they belong to.