Automatic NNNX formatting

Copper Contributor

Hi, i'm working with some data which requires to be setup in a specific way, containing an Address name + House number - it's seemingly a very simple issue, but i can't seem to solve it...

 

The data is drawn from Sheet A and put together in a collumn in Sheet B

 

Example:

In sheet A, the current formatting inserts leading zeros, so if i insert "1" in a field, the number becomes 001, if i insert "11" it becomes 011 and if i insert "111", it becomes 111.

If i insert e.g. "1A", it becomes 1A:

VBLITU_0-1683206828669.png

As it's a marginal amount of rows that require a letter, i can just manually change them so they show as the right format:

VBLITU_1-1683206985214.png

However an issue shows up when the data is put together in Sheet B:

The data in Sheet B is collected from Sheet A, combining a cell containing an adress name with the corresponding cell containing its house number.

 

The issue is that in Sheet B, the leading zeros need to be removed.

Currently, the cells in Sheet B are setup with a CONCATENATE function, which combines the above data, and removes the leading zeros - but the cells that are manually changed to contain leading zeros still show up with leading zeros:

VBLITU_2-1683207145688.png

Any easy solutions to this? :)

 

1 Reply

@VBLITU 

One option is to change the number format of the house number column on Sheet A to Text, and to enter the house numbers with leading zeros.

The formula on Sheet B will then show the leading zeros too.

Another option is to leave Sheet A as it is, and change the formula on Sheet B to use the TEXT function:

 

=CONCATENATE(A2, TEXT(B2, "000"))

 

where A is the column with the street name and B is the column with the house number.