Your macro alters cells with a sheet, so can't be made into a function. What is the name of the macro now? Why have you stored it in the sheet code area of the workbook? Are you sure you've stored it the sheet code area ... and if so, what is the sheet name.
What have you tried in the way of calling this macro so far?