Follow the link in my previous post. The code is a UDF in the UDF Library. The header of the UDF contains examples.

Are you familiar with including a UDF in your code? If not, see this link: How to use UDFs
_________________________
Home page: http://www.kixhelp.com/hb/