You can edit the function in the Visual Basic Editor.
Open the workbook containing the function. Press Alt+F11 to go to the VBE. Look at (double click) all the modules in the window on the left until you find your function in the window on the right. Then make your changes.