Hi,<BR><BR>I'm not sure how to go about writing a function or subroutine for that matter. I've searched various sites without success in finding good examples. I need to format a number (user input from a html form) e.g. 9711970. This number needs to be formatted to represent 97-0011970 ...where the prefix consists of two digits and a hyphen, and the rest is seven digits long where 11970 must be padded with leading zeros to make up the total of seven digits. Any help would be appreciated. THanks.