I have posted a UDF called MyAT into the UDF section which does this.

Mark