Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro
How to make a macro who will check one entire column (etc. A) for numbers
with 4 digits and less and change it to a 5 digits numbers. Example: 499 to 00499 1480 to 01480 and 5 digits number leave unchanged. Thanks! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro
Just record this custom formatting. Modified to remove selections.
Sub Macro3() ' ' Macro3 Macro ' Macro recorded 6/1/2004 by Don Guillett ' ' Range("C1:C200").NumberFormat = "00000" End Sub -- Don Guillett SalesAid Software "C3" wrote in message ... How to make a macro who will check one entire column (etc. A) for numbers with 4 digits and less and change it to a 5 digits numbers. Example: 499 to 00499 1480 to 01480 and 5 digits number leave unchanged. Thanks! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Macro
C3
You don't need a macro for this, just select the column and FormatCellsCustom. Enter 00000 and OK. If you want a macro........... Sub Five_Digits() Columns("A:A").Select Selection.NumberFormat = "00000" End Sub Gord Dibben Excel MVP On Tue, 1 Jun 2004 15:06:40 +0200, "C3" wrote: How to make a macro who will check one entire column (etc. A) for numbers with 4 digits and less and change it to a 5 digits numbers. Example: 499 to 00499 1480 to 01480 and 5 digits number leave unchanged. Thanks! |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Macro recorded... tabs & file names changed, macro hangs | Excel Worksheet Functions | |||
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) | |||
macro to delete entire rows when column A is blank ...a quick macro | Excel Programming | |||
Start Macro / Stop Macro / Restart Macro | Excel Programming |