Home |
Search |
Today's Posts |
|
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
|
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
Or, you can just custom format as 00000
-- Don Guillett Microsoft MVP Excel SalesAid Software "Jem" wrote in message ... 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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
On Sat, 12 Jul 2008 06:30:27 -0500, "Don Guillett"
wrote: Or, you can just custom format as 00000 That will only give you the 0, not the " I guess. |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
I guess that's right if that's what OP wants??? -- Don Guillett Microsoft MVP Excel SalesAid Software "Lars-Åke Aspelin" wrote in message ... On Sat, 12 Jul 2008 06:30:27 -0500, "Don Guillett" wrote: Or, you can just custom format as 00000 That will only give you the 0, not the " I guess. |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
excel macro
then you could use the custom number format \"00000
But the cell would still just contain 1234 - don't know what the OP wants actually stored in the cell for a macro: Sub FormatCell ActiveCell.NumberFormat = "\""00000" End sub -- Regards, Tom Ogilvy "Don Guillett" wrote: I guess that's right if that's what OP wants??? -- Don Guillett Microsoft MVP Excel SalesAid Software "Lars-Ã…ke Aspelin" wrote in message ... On Sat, 12 Jul 2008 06:30:27 -0500, "Don Guillett" wrote: Or, you can just custom format as 00000 That will only give you the 0, not the " I guess. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort | Excel Worksheet Functions | |||
My excel macro recorder no longer shows up when recording macro | Excel Discussion (Misc queries) | |||
Call macro stored in Excel workbook from Outlook's macro | Excel Programming | |||
Need syntax for RUNning a Word macro with an argument, called from an Excel macro | Excel Programming | |||
translate lotus 1-2-3 macro into excel macro using excel 2000 | Excel Programming |