Most of my spreadsheets use User Defined Functions (UDFs), and these often return an array of results, rather than just one value, and need to be entered as an array function. These things are not difficult to use, but for those not familiar with them they can be off-putting, so the two links below present an overview of using array functions and UDFs. Please leave a comment if anything is not clear.
Finally, many of the posts here form series that grow over months or even years. Always have a check at the end of each post for “ping-backs” from more recent posts at this blog, where the topic will be developed further and/or new versions of spreadsheets may be published.