Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cat Cat is offline
external usenet poster
 
Posts: 63
Default function result losing leading zeros

I am merging two custom values "0000" together with a dash, and the result
loses the leading zeros. Ex. 0001 and 0101 end up as 1-101 and I want it to
be 0001-0101. Note*The number of leading zeros changes since I have a huge
list of values, so I can't just add the 3 and 1 zero(s) needed in this
example.

using formula =(F7&"-"&G7) AND Custom Format 0000 in the two previous
columns to the function column.
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default function result losing leading zeros

Take a look at the TEXT function in help

--


Regards,


Peo Sjoblom

"cat" wrote in message
...
I am merging two custom values "0000" together with a dash, and the result
loses the leading zeros. Ex. 0001 and 0101 end up as 1-101 and I want it
to
be 0001-0101. Note*The number of leading zeros changes since I have a
huge
list of values, so I can't just add the 3 and 1 zero(s) needed in this
example.

using formula =(F7&"-"&G7) AND Custom Format 0000 in the two previous
columns to the function column.



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Cat Cat is offline
external usenet poster
 
Posts: 63
Default function result losing leading zeros

when I try to convert the numbers to text I lose my leading zeros?

"Peo Sjoblom" wrote:

Take a look at the TEXT function in help

--


Regards,


Peo Sjoblom

"cat" wrote in message
...
I am merging two custom values "0000" together with a dash, and the result
loses the leading zeros. Ex. 0001 and 0101 end up as 1-101 and I want it
to
be 0001-0101. Note*The number of leading zeros changes since I have a
huge
list of values, so I can't just add the 3 and 1 zero(s) needed in this
example.

using formula =(F7&"-"&G7) AND Custom Format 0000 in the two previous
columns to the function column.




  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 964
Default function result losing leading zeros

TEXT function not convert to text, if you have for instance F7 formatted as
0000 then when you concatenate it with another cell you need to use the same
format


=TEXT(F7,"0000")&" - "&TEXT(G7,"0000")

--


Regards,


Peo Sjoblom

"cat" wrote in message
...
when I try to convert the numbers to text I lose my leading zeros?

"Peo Sjoblom" wrote:

Take a look at the TEXT function in help

--


Regards,


Peo Sjoblom

"cat" wrote in message
...
I am merging two custom values "0000" together with a dash, and the
result
loses the leading zeros. Ex. 0001 and 0101 end up as 1-101 and I want
it
to
be 0001-0101. Note*The number of leading zeros changes since I have a
huge
list of values, so I can't just add the 3 and 1 zero(s) needed in this
example.

using formula =(F7&"-"&G7) AND Custom Format 0000 in the two previous
columns to the function column.






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
mail merge in excel/losing leading zero Stacie Excel Discussion (Misc queries) 1 July 14th 08 05:50 AM
zip codes without losing leading zero from csv mccafl Excel Discussion (Misc queries) 5 March 2nd 07 12:58 AM
keep leading zeros when using the paste spec. multiply function Debi Excel Discussion (Misc queries) 4 February 22nd 07 05:41 PM
LEADING ZEROS IN FORMULA RESULT Advent Excel Worksheet Functions 4 December 8th 06 01:22 PM
save text field w/ leading zeros in .csv format & not lose zeros? Ques Excel Discussion (Misc queries) 1 May 4th 05 06:21 PM


All times are GMT +1. The time now is 02:49 PM.

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"