Thread: excel macro
View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Lars-Åke Aspelin[_2_] Lars-Åke Aspelin[_2_] is offline
external usenet poster
 
Posts: 913
Default excel macro

On Sat, 12 Jul 2008 03:00:00 -0700 (PDT), Jem
wrote:

hi to all,

I have this data 1234 in cell K27.
how to make macro that will add "0 to the beginning:

My data is:

1234

That the result will look like this:

"01234



Thanks,
Lorena



try this macro:

Sub jem()
With ActiveSheet
.Cells(27, 11) = """0" & .Cells(27, 11)
End With
End Sub

Hope this helps / Lars-Åke