How about this thread...

http://www.excelforum.com/excel-prog...-function.html