View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
quartz[_2_] quartz[_2_] is offline
external usenet poster
 
Posts: 441
Default Need a left pad formula method

I am using Windows XP and Office 2003.

I need a formula to left pad some ID numbers that contain both letters and
numbers and can be from three to seven characters in length so that all IDs
have ten characters. This conversion will occur in another column. For
example:

8912 would become 0000008912
42138A would become 000042138A

I tried: =Text(A1, "0000000") and this works great when the ID is all
numbers, but this fails if letters are involved.