PC Review


Reply
Thread Tools Rate Thread

combining integer and decimals

 
 
badongt
Guest
Posts: n/a
 
      14th Jun 2008
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???
 
Reply With Quote
 
 
 
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      14th Jun 2008
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" <(E-Mail Removed)> wrote in message
news:371C14F4-ACD5-4714-B941-(E-Mail Removed)...
> 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???


 
Reply With Quote
 
badongt
Guest
Posts: n/a
 
      14th Jun 2008
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" <(E-Mail Removed)> wrote in message
> news:371C14F4-ACD5-4714-B941-(E-Mail Removed)...
> > 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???

>
>

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      14th Jun 2008
I'm not sure what you mean... can you give some examples of calculations
that are giving you trouble?

Rick


"badongt" <(E-Mail Removed)> wrote in message
news:79B48D3F-F64A-46D8-BD67-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:371C14F4-ACD5-4714-B941-(E-Mail Removed)...
>> > 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???

>>
>>


 
Reply With Quote
 
badongt
Guest
Posts: n/a
 
      14th Jun 2008
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" <(E-Mail Removed)> wrote in message
> news:371C14F4-ACD5-4714-B941-(E-Mail Removed)...
> > 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???

>
>

 
Reply With Quote
 
Rick Rothstein \(MVP - VB\)
Guest
Posts: n/a
 
      14th Jun 2008
How do you concatenate one cell? Please show examples of what you have and
what you want when finished.

Rick


"badongt" <(E-Mail Removed)> wrote in message
news:9B52EA96-5855-4CAD-98C0-(E-Mail Removed)...
> 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" <(E-Mail Removed)> wrote in message
>> news:371C14F4-ACD5-4714-B941-(E-Mail Removed)...
>> > 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???

>>
>>


 
Reply With Quote
 
Ron Rosenfeld
Guest
Posts: n/a
 
      14th Jun 2008
On Fri, 13 Jun 2008 23:23:00 -0700, badongt <(E-Mail Removed)>
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 With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Integer to number, too many decimals Eric Microsoft VB .NET 3 17th Jun 2010 06:19 PM
Decimals Constant to 0.50 or Nearest Integer Esssa Microsoft Excel Worksheet Functions 3 23rd Oct 2008 11:56 AM
Currency Data Type 2 decimals - actual value shows 4 decimals =?Utf-8?B?VGhvbWFzY2w=?= Microsoft Access 5 24th Mar 2006 04:01 PM
'AddressOf' expression cannot be converted to 'Integer' because 'Integer'is not a delegate type. Patrick Dugan Microsoft VB .NET 3 14th Mar 2005 03:12 PM
Integer displaying with two decimals! Laurel Eppstein Microsoft Access Form Coding 4 5th Jul 2004 10:45 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 09:36 PM.