Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
i have a field that has a number in it for example
100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this |
#2
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can use a formula like =TEXT(A4,"0000") to force padded zeros to show, or
you can make a custom number format like 0000 to make up to 4 leading zeros show, (but the actual data will not be changed) Hope that helps, TK "dlb1228" wrote: i have a field that has a number in it for example 100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this |
#3
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Format it as 0000 (FormatCellsCustom)
-- HTH Bob Phillips (replace xxxx in the email address with gmail if mailing direct) "dlb1228" wrote in message ... i have a field that has a number in it for example 100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this |
#4
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can 'display' it as four digits by selecting the data, going to
FormatCells...Custom and type 0000 in the text box I stress display...the underlying data is still a number without leading zeroes -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England www.nickhodge.co.uk HIS "dlb1228" wrote in message ... i have a field that has a number in it for example 100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this |
#5
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Format as "0000"
"dlb1228" wrote: i have a field that has a number in it for example 100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this |
#6
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
Hi
=rept("0",4-len(a2))&a2 assuming that the 100 are in A2, please, have notice that the numbers will be a text. Hope this helps Regards from Brazil - going to the 6th Marcelo "dlb1228" escreveu: i have a field that has a number in it for example 100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this |
#7
![]()
Posted to microsoft.public.excel.misc
|
|||
|
|||
![]()
You can preformat the cells as Text first and type all 4 digits.
You can prefix the entry with an apostrophe: '0012 Or you can give the column a custom format of: 0000 (Format|Cells|number tab|custom category and type 0000 in that box) The value won't change, but you'll see leading zeros in the cell (not in the formula bar, though). dlb1228 wrote: i have a field that has a number in it for example 100 115 116 12 i want these to always be 4 digits and put zeros in front of the number how can i do this -- Dave Peterson |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Number of labels on X-axis one more than number of values on Y-axi | Charts and Charting in Excel | |||
how to add a letter in front of each number in a cell | Excel Discussion (Misc queries) | |||
Count Number of Characters in a cell? | Excel Discussion (Misc queries) | |||
Need number of Saturdays and number of Sundays between 2 dates | Excel Worksheet Functions | |||
how do i get excel to NOT take zero's of the front of a number | Excel Discussion (Misc queries) |