Formula problem with leading zeros

S

shieldwolf

I have 3 colums that have data that looks like;

1) 1001, 2) 06, 3) 02.

i am trying to cmbine them but excel drops the zeros in the formula.

The end result I am looking foris 1001_06_02. Currently I get 1001_6_2

Thanks for the help!
 
J

JE McGimpsey

I have 3 colums that have data that looks like;

1) 1001, 2) 06, 3) 02.

i am trying to cmbine them but excel drops the zeros in the formula.

The end result I am looking foris 1001_06_02. Currently I get 1001_6_2

Thanks for the help!

One way:

=A1 & TEXT(B1,"\_00") & TEXT(C1,"\_00")

Functions normally only use stored values, rather than the displayed
values (i.e., formatting), so you need to explicitly format them in your
function.

Note that the underscore is a special character in a format, so the
backslash is necessary to "escape it", or tell the parser that the
underscore should be displayed.
 
Top