ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   automatically prefix cell entry with leading zeros (https://www.excelbanter.com/excel-worksheet-functions/134072-automatically-prefix-cell-entry-leading-zeros.html)

Automatic prefix set with leading zeros

automatically prefix cell entry with leading zeros
 
Hi,

I am trying to setup a prefix where I have a set number starting out but
need to add additional numbers..

I have the format down to do that but is there a way to keep the leading
zeros displayed since some of the numbers I have start with zeros...

Example 123 is the set number and i want to add 00456...

correct result 123456

Teethless mama

automatically prefix cell entry with leading zeros
 
Let's say:
A1: contain 123
B1: contain 456

In C1: =A1&B1


"Automatic prefix set with leading zeros" wrote:

Hi,

I am trying to setup a prefix where I have a set number starting out but
need to add additional numbers..

I have the format down to do that but is there a way to keep the leading
zeros displayed since some of the numbers I have start with zeros...

Example 123 is the set number and i want to add 00456...

correct result 123456


John Bundy

automatically prefix cell entry with leading zeros
 
Use the text function, or set the column format to text.
with the function, change the 4 zeroes below to the number of digits there
will be
=TEXT(A1,"0000")
--
-John Northwest11
Please rate when your question is answered to help us and others know what
is helpful.


"Automatic prefix set with leading zeros" wrote:

Hi,

I am trying to setup a prefix where I have a set number starting out but
need to add additional numbers..

I have the format down to do that but is there a way to keep the leading
zeros displayed since some of the numbers I have start with zeros...

Example 123 is the set number and i want to add 00456...

correct result 123456



All times are GMT +1. The time now is 05:41 PM.

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