I created an Excel custom function as a Microsoft 365 add-in, following the example in the documentation: https://docs.microsoft.com/en-us/office/dev/add-ins/quickstarts/exc