ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   the "0" number is lost when combining multiple columns (https://www.excelbanter.com/excel-worksheet-functions/127704-0-number-lost-when-combining-multiple-columns.html)

Hal

the "0" number is lost when combining multiple columns
 
Hello,

I have data in two columns (A and B) that I wish to combine into a third
column (C) by using the "&" feature as follows:

=A1&B1

The data in Column A is a product code # (i.e. 05296)
The data in Column B are letters (i.e. MND)

However, when I combine them both together in Column "C", I get "5296MND"
instead of "05296MND". The "0" is missing. How I can maintain the
integrity of the "0" and have it appear in the cell?

Thank you in advance.

Hal.



Max

the "0" number is lost when combining multiple columns
 
Try it in C1 as:
=TEXT(A1,"00000")&B1
where col A = prod codes
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Hal" wrote in message
...
Hello,

I have data in two columns (A and B) that I wish to combine into a third
column (C) by using the "&" feature as follows:

=A1&B1

The data in Column A is a product code # (i.e. 05296)
The data in Column B are letters (i.e. MND)

However, when I combine them both together in Column "C", I get "5296MND"
instead of "05296MND". The "0" is missing. How I can maintain the
integrity of the "0" and have it appear in the cell?

Thank you in advance.

Hal.





SteveW

the "0" number is lost when combining multiple columns
 
This should work,
the problem is that the format of cell A1, is not used when you have
C1= A1 & B1

So you have to explicitly format A1 in the combine formula
Steve

On Thu, 25 Jan 2007 13:57:24 -0000, Max wrote:

Try it in C1 as:
=TEXT(A1,"00000")&B1
where col A = prod codes




--
Steve (3)

Hal

the "0" number is lost when combining multiple columns
 
Thank you Max for your help!

Hal

"Max" wrote in message
...
Try it in C1 as:
=TEXT(A1,"00000")&B1
where col A = prod codes
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Hal" wrote in message
...
Hello,

I have data in two columns (A and B) that I wish to combine into a third
column (C) by using the "&" feature as follows:

=A1&B1

The data in Column A is a product code # (i.e. 05296)
The data in Column B are letters (i.e. MND)

However, when I combine them both together in Column "C", I get

"5296MND"
instead of "05296MND". The "0" is missing. How I can maintain the
integrity of the "0" and have it appear in the cell?

Thank you in advance.

Hal.







Hal

the "0" number is lost when combining multiple columns
 
Thank you Steve for your help!

Hal.

"SteveW" wrote in message
news:op.tmpu75abevjsnp@enigma03...
This should work,
the problem is that the format of cell A1, is not used when you have
C1= A1 & B1

So you have to explicitly format A1 in the combine formula
Steve

On Thu, 25 Jan 2007 13:57:24 -0000, Max wrote:

Try it in C1 as:
=TEXT(A1,"00000")&B1
where col A = prod codes




--
Steve (3)



Max

the "0" number is lost when combining multiple columns
 
You're welcome, Hal !
--
Max
Singapore
http://savefile.com/projects/236895
xdemechanik
---
"Hal" wrote in message
...
Thank you Max for your help!

Hal





All times are GMT +1. The time now is 12:03 AM.

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