Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default formatting question

Hello everybody,

I have a table with codes (6digits). Some of them start with a zero.
I formatted the cell with a custom format: 000000, which works fine.
Instead of 41719, I can see 041719

In a certain cell I concatenate the entries of two cells, the above
mentioned code and another code.

=concatenate(code1," / ",code2)

637002 9588 becomes 637002 / 9588

but

041719 9580 becomes 41719 / 9580

I lost the zero in front and I have no idea how I can get it back. I
tried various possibilities with cell formats.

The idea of formatting the code1 table as text and write '041719, I
don't like, because in case of sorting the table, these entries will
be at the end instead at the top.

Thanks,
Norbert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default formatting question

=TEXT(code1,"000000")&" / "&Text(code2,"000000")


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Orion" wrote in message
...
Hello everybody,

I have a table with codes (6digits). Some of them start with a zero.
I formatted the cell with a custom format: 000000, which works fine.
Instead of 41719, I can see 041719

In a certain cell I concatenate the entries of two cells, the above
mentioned code and another code.

=concatenate(code1," / ",code2)

637002 9588 becomes 637002 / 9588

but

041719 9580 becomes 41719 / 9580

I lost the zero in front and I have no idea how I can get it back. I
tried various possibilities with cell formats.

The idea of formatting the code1 table as text and write '041719, I
don't like, because in case of sorting the table, these entries will
be at the end instead at the top.

Thanks,
Norbert



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,624
Default formatting question

One way:

=TEXT(code1,"000000\/") & TEXT(code2,"0000")

In article ,
Orion wrote:

Hello everybody,

I have a table with codes (6digits). Some of them start with a zero.
I formatted the cell with a custom format: 000000, which works fine.
Instead of 41719, I can see 041719

In a certain cell I concatenate the entries of two cells, the above
mentioned code and another code.

=concatenate(code1," / ",code2)

637002 9588 becomes 637002 / 9588

but

041719 9580 becomes 41719 / 9580

I lost the zero in front and I have no idea how I can get it back. I
tried various possibilities with cell formats.

The idea of formatting the code1 table as text and write '041719, I
don't like, because in case of sorting the table, these entries will
be at the end instead at the top.

Thanks,
Norbert

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 123
Default formatting question


Change your formula as under:
=CONCATENATE(TEXT(code1,"000000")," / ",code2)

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35
Default formatting question

Wow, that seemed to be a very easy task for the specialists!!

Thanks to Sharad, JE McGimpsey and Bob Phillips for that superquick
response.

Norbert


On Tue, 21 Dec 2004 04:27:10 -0800, Sharad
wrote:


Change your formula as under:
=CONCATENATE(TEXT(code1,"000000")," / ",code2)

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default formatting question

It's been asked a few times Norbert, so we had the answer tucked up our
collective sleeve :-)

Bob


"Orion" wrote in message
...
Wow, that seemed to be a very easy task for the specialists!!

Thanks to Sharad, JE McGimpsey and Bob Phillips for that superquick
response.

Norbert


On Tue, 21 Dec 2004 04:27:10 -0800, Sharad
wrote:


Change your formula as under:
=CONCATENATE(TEXT(code1,"000000")," / ",code2)

Sharad

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!




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
formatting question driller Excel Discussion (Misc queries) 3 September 26th 09 05:02 AM
Formatting Question tecook02902 Excel Discussion (Misc queries) 2 March 21st 07 02:01 PM
Formatting Question Carey Abercrombie Excel Worksheet Functions 5 February 23rd 06 07:40 PM
Formatting Question M.Siler Excel Discussion (Misc queries) 3 July 18th 05 09:51 PM
Formatting Question Metalteck Excel Discussion (Misc queries) 1 July 15th 05 05:37 PM


All times are GMT +1. The time now is 10:01 PM.

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

About Us

"It's about Microsoft Excel"