> ...it is not working in my file .. Please find out what is the reason
Believe you didn't follow the steps given in my earlier response
in your orignal post, viz:
> To implement the UDF:
> Press Alt+F11 to go to VBE
> Click Insert > Module
> Copy and paste the UDF* into the white space on the right
> *everything within the dotted lines ("begin vba" to "end vba")
> Alt+Q to get back to Excel
You had wrongly placed Tom's UDF in the worksheet code
when it should be placed in a regular module, via the steps above
I've rectified and will send the corrected file back to you.
Btw, in the CDO webpage (where you post and read responses)
you can / should reply to responders via clicking the "Reply" icon next
to "New", instead of starting new posts to carry on a discussion.
Please keep discussions within the newsgroup for the benefit of all.
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---