combining integer and decimals

B

badongt

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???
 
R

Rick Rothstein \(MVP - VB\)

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
 
R

Rick Rothstein \(MVP - VB\)

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

Rick
 
B

badongt

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

Rick Rothstein \(MVP - VB\)

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

Rick
 
R

Ron Rosenfeld

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top