An easy way to do that is to add this to the notebook and evaluate it once.
SetOptions[EvaluationNotebook[], AutoGeneratedPackage -> Automatic]
Set the cells of functions you want to export as Initialization
cells. With that setup, whenever you save the notebook a corresponding .m
file is created with the exported functions. To use them in a different notebook, use Get
to load the .m
file.