Hi,
Enter the following formula in B1, assuming that A1 contains the
user-entered number.
=LEFT(A1,5)&"-"&RIGHT(10000+RIGHT(A1,LEN(A1)-5),4)
The formula will convert,
123451 to 12345-0001
1234512 to 12345-0012
12345123 to 12345-0123
123451234 to 12345-1234
If the user enters a number containing less than 6 digits, it would return
an error as #VALUE!
If you have several user-entered numbers in column A (eg., A1:A101) enter
the above formula in B1 and fil-in the formula down to B101.
Hope this helps,
Regards,
B. R. Ramachandran