Unless you would rather go with DLL formula solution then:
1. With your workbook open press Alt-F11 to open the VB editor
2. In the left hand pane double-click on Module1
3. Scroll down to the bottom
4 Paste in the code I posted above
5. Close the VB editor
Job done.
Bookmarks