View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Lowell B. Copeland[_2_] Lowell B. Copeland[_2_] is offline
external usenet poster
 
Posts: 1
Default Macro to insert "0" in front of 4 character string

I need to write a small macro that will accomplish the
following. I am working with a column of numbers (as text)
they are zip codes. The zipcodes that begin with zero have
had their starting zero removed by the program in which
they were initially stored. I need to insert a zero in
front of any zipcode that has only 4 characters. Here is
what I am currently doing in an active cell like [2345]

[F2] to go into edit mode
[Home] to move to the front of the string
[0] to insert the "0" at the front of the string
[Enter] to go down to the next cell.

I want to create a keystroke macro that is faster

Any ideas.

Thanks Lowell