Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
EricKei
 
Posts: n/a
Default Concatenate function - keeping "displayed" extra digits

I am using the following setup to force leading zeroes in my cells (thanks to
another poster here) :

Format Cells Custom 00000

This causes Excel to display any numbers with fewer than 5 digits in a
manner such as 00067 (if the original number was 67, for example).

My question is this: When using the CONCATENATE(A1&B1) function to join the
cells in question, any cells whose source data contained fewer than 5 digits
to begin with get Concatenated without those leading zeroes. I tried
formatting them as ZIP Codes (automatically adds the leading zeroes), but
Concatenate still strips out the "extra" zeroes. How would I change this such
that it Concatenates full 5-digit entry, rather than the 2-4 digits
origianally inserted?

ie, it turns 00167 00465 into 167465

Thanks in advance for yor help.
  #2   Report Post  
JE McGimpsey
 
Posts: n/a
Default

One way:

=TEXT(A1,"00000") & TEXT(A2, " 00000")


In article ,
"EricKei" wrote:

I am using the following setup to force leading zeroes in my cells (thanks to
another poster here) :

Format Cells Custom 00000

This causes Excel to display any numbers with fewer than 5 digits in a
manner such as 00067 (if the original number was 67, for example).

My question is this: When using the CONCATENATE(A1&B1) function to join the
cells in question, any cells whose source data contained fewer than 5 digits
to begin with get Concatenated without those leading zeroes. I tried
formatting them as ZIP Codes (automatically adds the leading zeroes), but
Concatenate still strips out the "extra" zeroes. How would I change this such
that it Concatenates full 5-digit entry, rather than the 2-4 digits
origianally inserted?

ie, it turns 00167 00465 into 167465

Thanks in advance for yor help.

  #3   Report Post  
Ron Coderre
 
Posts: n/a
Default

Keep in mind that formatting only changes the way a value is displayed, not
the actual value. Consequently, I think you'd need something like this:

=CONCATENATE(TEXT(A1,"00000")&TEXT(B1,"00000"))

Or, this should also work:

=TEXT(A1,"00000")&TEXT(B1,"00000")


Does that help?
--
Regards,
Ron

  #4   Report Post  
EricKei
 
Posts: n/a
Default


=CONCATENATE(TEXT(A1,"00000")&TEXT(B1,"00000"))

Does that help?



Yes! It worked like a charm :) Thanks again!
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Date & Time mully New Users to Excel 4 May 23rd 05 11:56 AM
Automatically up date time in a cell Mark Excel Discussion (Misc queries) 5 May 12th 05 12:26 AM
clock Wildman Excel Worksheet Functions 2 April 26th 05 10:31 AM
Can you use Concatenate with the If function with vlookup in the i simoneaux Excel Worksheet Functions 2 February 7th 05 08:45 PM
Concatenate Function will not work Chuck W Excel Discussion (Misc queries) 4 January 31st 05 11:41 PM


All times are GMT +1. The time now is 02:19 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"