ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Concatenation in Excel (https://www.excelbanter.com/excel-worksheet-functions/192411-concatenation-excel.html)

Muthalaly

Concatenation in Excel
 
Hi,
I am trying to concatenate two fields in excel.In this one field is a cutom
number field .When I am doing the concatenation I am losing the zeros before
the number.
Example 00123 + abc I am getting a result of 123abc .But I am looking
forward to get 00123abc. Is it possible in excel?Please help.

FSt1

Concatenation in Excel
 
hi
i suspect that the 00123 is formated with leading zeros meaning that the
zeros are not there to concatinate. i think you may have to reform as text
and add the leading zeros.

regards
FSt1

"Muthalaly" wrote:

Hi,
I am trying to concatenate two fields in excel.In this one field is a cutom
number field .When I am doing the concatenation I am losing the zeros before
the number.
Example 00123 + abc I am getting a result of 123abc .But I am looking
forward to get 00123abc. Is it possible in excel?Please help.


MartinW[_2_]

Concatenation in Excel
 
Hi Muthalaly,

This is a bit long winded but you may be able to work it in to your formula.
=IF(LEN(A1)=1,"0000"&A1,IF(LEN(A1)=2,"000"&A1,IF(L EN(A1)=3,"00"&A1,IF(LEN(A1)=4,"0"&A1,A1))))

With A1 formatted as custom 00000, this will add the formatted
zeroes to your concatenation. Just add the abc where appropriate.

HTH
Martin

"Muthalaly" wrote in message
...
Hi,
I am trying to concatenate two fields in excel.In this one field is a
cutom
number field .When I am doing the concatenation I am losing the zeros
before
the number.
Example 00123 + abc I am getting a result of 123abc .But I am looking
forward to get 00123abc. Is it possible in excel?Please help.




Pete_UK

Concatenation in Excel
 
Try this:

=TEXT(A1,"00000") & B1

with your number in A1 and the text in B1.

Hope this helps.

Pete

On Jun 24, 12:12*pm, Muthalaly
wrote:
Hi,
I am trying to concatenate two fields in excel.In this one field is a cutom
number field .When I am doing the concatenation I am losing the zeros before
the number.
Example 00123 + abc I am getting a result of 123abc .But I am looking
forward to get 00123abc. Is it possible in excel?Please help.



MartinW[_2_]

Concatenation in Excel
 
Derrr!! <bg

No excuses
Martin

"Pete_UK" wrote in message
...
Try this:

=TEXT(A1,"00000") & B1

with your number in A1 and the text in B1.

Hope this helps.

Pete

On Jun 24, 12:12 pm, Muthalaly
wrote:
Hi,
I am trying to concatenate two fields in excel.In this one field is a
cutom
number field .When I am doing the concatenation I am losing the zeros
before
the number.
Example 00123 + abc I am getting a result of 123abc .But I am looking
forward to get 00123abc. Is it possible in excel?Please help.




Muthalaly

Concatenation in Excel
 
Thank you so much for the help!!!

"Pete_UK" wrote:

Try this:

=TEXT(A1,"00000") & B1

with your number in A1 and the text in B1.

Hope this helps.

Pete

On Jun 24, 12:12 pm, Muthalaly
wrote:
Hi,
I am trying to concatenate two fields in excel.In this one field is a cutom
number field .When I am doing the concatenation I am losing the zeros before
the number.
Example 00123 + abc I am getting a result of 123abc .But I am looking
forward to get 00123abc. Is it possible in excel?Please help.




Pete_UK

Concatenation in Excel
 
You're welcome - thanks for feeding back.

Pete

On Jun 24, 2:35*pm, Muthalaly
wrote:
Thank you so much for the help!!!



All times are GMT +1. The time now is 04:56 PM.

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