Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default combining integer and decimals

Numbers show an extra zero "0" before the decimal point that changes the
display value whenever i do a concatenate with an integer..Is there a way to
remove that extra "0" so it would display the concatenated value properly???
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combining integer and decimals

I'm not really "satisfied" with this one, but it does work. If your two
numbers are in A1 and B1...

=IF(LEFT(A1,2)="0.",MID(A1,2,99),A1)&IF(LEFT(B1,2) ="0.",MID(B1,2,99),B1)

Now the above is a completely general solution; however, if A1 **always**
contains an integer, the formula can be simplified...

=A1&IF(LEFT(B1,2)="0.",MID(B1,2,99),B1)

Rick


"badongt" wrote in message
...
Numbers show an extra zero "0" before the decimal point that changes the
display value whenever i do a concatenate with an integer..Is there a way
to
remove that extra "0" so it would display the concatenated value
properly???


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default combining integer and decimals

What if the integers digits changes from 2 to 3 and vice versa?

"Rick Rothstein (MVP - VB)" wrote:

I'm not really "satisfied" with this one, but it does work. If your two
numbers are in A1 and B1...

=IF(LEFT(A1,2)="0.",MID(A1,2,99),A1)&IF(LEFT(B1,2) ="0.",MID(B1,2,99),B1)

Now the above is a completely general solution; however, if A1 **always**
contains an integer, the formula can be simplified...

=A1&IF(LEFT(B1,2)="0.",MID(B1,2,99),B1)

Rick


"badongt" wrote in message
...
Numbers show an extra zero "0" before the decimal point that changes the
display value whenever i do a concatenate with an integer..Is there a way
to
remove that extra "0" so it would display the concatenated value
properly???



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combining integer and decimals

I'm not sure what you mean... can you give some examples of calculations
that are giving you trouble?

Rick


"badongt" wrote in message
...
What if the integers digits changes from 2 to 3 and vice versa?

"Rick Rothstein (MVP - VB)" wrote:

I'm not really "satisfied" with this one, but it does work. If your two
numbers are in A1 and B1...

=IF(LEFT(A1,2)="0.",MID(A1,2,99),A1)&IF(LEFT(B1,2) ="0.",MID(B1,2,99),B1)

Now the above is a completely general solution; however, if A1 **always**
contains an integer, the formula can be simplified...

=A1&IF(LEFT(B1,2)="0.",MID(B1,2,99),B1)

Rick


"badongt" wrote in message
...
Numbers show an extra zero "0" before the decimal point that changes
the
display value whenever i do a concatenate with an integer..Is there a
way
to
remove that extra "0" so it would display the concatenated value
properly???




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default combining integer and decimals

Thanks for the quick reply Rick, i also would like to ask what if the numbers
(both integer and decimal) are in 1 cell..?

"Rick Rothstein (MVP - VB)" wrote:

I'm not really "satisfied" with this one, but it does work. If your two
numbers are in A1 and B1...

=IF(LEFT(A1,2)="0.",MID(A1,2,99),A1)&IF(LEFT(B1,2) ="0.",MID(B1,2,99),B1)

Now the above is a completely general solution; however, if A1 **always**
contains an integer, the formula can be simplified...

=A1&IF(LEFT(B1,2)="0.",MID(B1,2,99),B1)

Rick


"badongt" wrote in message
...
Numbers show an extra zero "0" before the decimal point that changes the
display value whenever i do a concatenate with an integer..Is there a way
to
remove that extra "0" so it would display the concatenated value
properly???





  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default combining integer and decimals

How do you concatenate one cell? Please show examples of what you have and
what you want when finished.

Rick


"badongt" wrote in message
...
Thanks for the quick reply Rick, i also would like to ask what if the
numbers
(both integer and decimal) are in 1 cell..?

"Rick Rothstein (MVP - VB)" wrote:

I'm not really "satisfied" with this one, but it does work. If your two
numbers are in A1 and B1...

=IF(LEFT(A1,2)="0.",MID(A1,2,99),A1)&IF(LEFT(B1,2) ="0.",MID(B1,2,99),B1)

Now the above is a completely general solution; however, if A1 **always**
contains an integer, the formula can be simplified...

=A1&IF(LEFT(B1,2)="0.",MID(B1,2,99),B1)

Rick


"badongt" wrote in message
...
Numbers show an extra zero "0" before the decimal point that changes
the
display value whenever i do a concatenate with an integer..Is there a
way
to
remove that extra "0" so it would display the concatenated value
properly???




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,651
Default combining integer and decimals

On Fri, 13 Jun 2008 23:23:00 -0700, badongt
wrote:

Numbers show an extra zero "0" before the decimal point that changes the
display value whenever i do a concatenate with an integer..Is there a way to
remove that extra "0" so it would display the concatenated value properly???


Ordinarily one would add numbers. Can you give an example of your source data,
and your desired results?
--ron
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
Count digits before decimals and after decimals Elton Law[_2_] Excel Worksheet Functions 5 April 3rd 23 10:59 AM
How do I add an integer to an existing integer? Aaron Excel Worksheet Functions 3 December 17th 09 09:46 PM
Decimals Constant to 0.50 or Nearest Integer Esssa Excel Worksheet Functions 3 October 23rd 08 11:56 AM
Numeric formatting: decimals and no decimals ppsa Excel Programming 4 July 14th 07 09:16 AM
Dim i,j,k As Integer Arne Hegefors Excel Programming 4 August 18th 06 04:49 PM


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

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"