Concatenating and Keeping an Input Mask

MrT82

Board Regular
Joined
Dec 12, 2005
Messages
84
Hi All,

I have a spreadsheet where I have the following cells:

FD 05 00181

I have used an input mask in order that the 05 column is always two digits long and the 00181 column is always five digits long.

When I concatenate the cells, I end up with FD/5/181… does anyone know how I can make it in order that the concatenated cell is FD/05/00181.

Thanks,

Paul
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Joe4

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
55,497
Office Version
  1. 365
Platform
  1. Windows
Custom formatting only changes the appearance of cells, not what is actually contained in them.

You can use the TEXT command to do what you want, i.e. if your values are in cells A1, B1, and C1, try:

=A1 & "/" & TEXT(B1,"00") & "/" & TEXT(C1,"00000")
 

Watch MrExcel Video

Forum statistics

Threads
1,119,137
Messages
5,576,299
Members
412,716
Latest member
Ardin
Top