View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rick Rothstein \(MVP - VB\)[_2118_] Rick Rothstein \(MVP - VB\)[_2118_] is offline
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???