ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Adding a digit (https://www.excelbanter.com/excel-discussion-misc-queries/53111-adding-digit.html)

cj21

Adding a digit
 

I have a long list of product codes e.g. 230956743, 485048675. But i
want to put a zero in front of each one e.g. 0230956743,
0485048675. Is there a quick way of doing this.

Obviously the column will have to be formatted as text because
otherwise the zero would dissapear.

Chris


--
cj21
------------------------------------------------------------------------
cj21's Profile: http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=480811


Roger Govier

Adding a digit
 

see response in .Excel

FormatCellsNumberCustom 0000000000
Regards

Roger Govier


cj21 wrote:
I have a long list of product codes e.g. 230956743, 485048675. But i
want to put a zero in front of each one e.g. 0230956743,
0485048675. Is there a quick way of doing this.

Obviously the column will have to be formatted as text because
otherwise the zero would dissapear.

Chris



Jim May

Adding a digit
 
"otherwise the zero would dissapear."
by this I take it that your codes are numbers, at present.
You can leave them as numbers, and just Format, Cells,
Custom, (In Box enter) 0000000000



"cj21" wrote in message
...

I have a long list of product codes e.g. 230956743, 485048675. But i
want to put a zero in front of each one e.g. 0230956743,
0485048675. Is there a quick way of doing this.

Obviously the column will have to be formatted as text because
otherwise the zero would dissapear.

Chris


--
cj21
------------------------------------------------------------------------
cj21's Profile:
http://www.excelforum.com/member.php...o&userid=25673
View this thread: http://www.excelforum.com/showthread...hreadid=480811




hideki

Adding a digit
 

Does building your own format is not the expected solution?

How about write something like this in the user defined format:
00000000# (depend how many digit you want). It will give you zero if
nothing in front the first no. If you only wanted one zero, put 0#####
(to the number you want).


--
hideki
------------------------------------------------------------------------
hideki's Profile: http://www.excelforum.com/member.php...o&userid=18903
View this thread: http://www.excelforum.com/showthread...hreadid=480811


swatsp0p

Adding a digit
 

Another option is to concatenate your zero with the cell entry. In a
helper column inserted next to your column of numbers, enter this:

="0"&A1 (where A1 is the first cell in your column of numbers-adjust
as needed. This will return a text entry that begins with zero)

Copy this down as far as needed. You can then copy this entire new row
and paste Specialvalues over top of the original data and delete the
inserted (helper) column.

Good Luck.


--
swatsp0p


------------------------------------------------------------------------
swatsp0p's Profile: http://www.excelforum.com/member.php...o&userid=15101
View this thread: http://www.excelforum.com/showthread...hreadid=480811



All times are GMT +1. The time now is 01:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com