Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
left fill Excel numbers
Hi;
I have varying length "numbers" in a text cell and I would like to make them all the same length. How can I Left-Fill with Zeros? ie. 2 121 98237 I would like: 00002 00121 98237 Thanks in advance |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
left fill Excel numbers
easiest might be to format 00000
-- Don Guillett SalesAid Software "DTTODGG" wrote in message ... Hi; I have varying length "numbers" in a text cell and I would like to make them all the same length. How can I Left-Fill with Zeros? ie. 2 121 98237 I would like: 00002 00121 98237 Thanks in advance |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
left fill Excel numbers
I believe you said your numbers are in cells formatted as text. In that case
try... Sub Macro1() For Each c In Selection.Cells c.Formula = Format(c, "0000#") Next c End Sub If the cells aren't formatted as text, add Selection.NumberFormat = "@" before the For Each statement. "DTTODGG" wrote: Hi; I have varying length "numbers" in a text cell and I would like to make them all the same length. How can I Left-Fill with Zeros? ie. 2 121 98237 I would like: 00002 00121 98237 Thanks in advance |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
My excel spread sheet has numbers down left side and across top? | Excel Discussion (Misc queries) | |||
Excel 2002 : Can I speed fill from left to right ? | Excel Discussion (Misc queries) | |||
Excel subtotals do not show on left of row numbers | Excel Worksheet Functions | |||
excel column & row numbers displaying right to left? | Excel Discussion (Misc queries) | |||
Can't see row numbers or left scroll arrow in Excel spreadsheet | New Users to Excel |