I believe it can be done, but you may need to write a custom function in VB(Visual Basic) which can be a complex task if you don't know what you're doing. The newer versions of Excel may have an easier way but I don't know.
HDR
hardman resources limited
excel experts required, page-3
Add to My Watchlist
What is My Watchlist?