PC Review


Reply
Thread Tools Rate Thread

how to change number to text with specific format in function

 
 
=?Utf-8?B?Vmllc3RhV3U=?=
Guest
Posts: n/a
 
      26th Jun 2007
=IF(C3<>0, (C3-C2)/B2*100 & " (" & C3-C2 & ")","")

This is the function I used at this moment. but it has some problem. all
data in column B & C are number format with no more than 4 decimal digits, so
that both (C3-C2)/B2*100 and C3-C2 are still number, especially without
decimal digits control.

The result I expected is for example when C3 = 2.5350 and C2 = 2.5060 and B2
= 2.456, the result shows me "1.18 (0.0290)". 2 decimal digits in the first
part, 4 decimal digits in the second part. Besides, it is possible that C3 is
smaller than C2, so that the negative number is also expected if it happens.

Who can help me to realize this result?

Thanks go to anyone who think about my troubles!

Best Regards,
Viesta Wu
 
Reply With Quote
 
 
 
 
Vasant Nanavati
Guest
Posts: n/a
 
      26th Jun 2007
What is the result that you are getting and what are you expecting?
________________________________________________________________________

"ViestaWu" <(E-Mail Removed)> wrote in message
news:0B03FFFD-A7B2-4877-814D-(E-Mail Removed)...
> =IF(C3<>0, (C3-C2)/B2*100 & " (" & C3-C2 & ")","")
>
> This is the function I used at this moment. but it has some problem. all
> data in column B & C are number format with no more than 4 decimal digits,
> so
> that both (C3-C2)/B2*100 and C3-C2 are still number, especially without
> decimal digits control.
>
> The result I expected is for example when C3 = 2.5350 and C2 = 2.5060 and
> B2
> = 2.456, the result shows me "1.18 (0.0290)". 2 decimal digits in the
> first
> part, 4 decimal digits in the second part. Besides, it is possible that C3
> is
> smaller than C2, so that the negative number is also expected if it
> happens.
>
> Who can help me to realize this result?
>
> Thanks go to anyone who think about my troubles!
>
> Best Regards,
> Viesta Wu



 
Reply With Quote
 
=?Utf-8?B?Vmllc3RhV3U=?=
Guest
Posts: n/a
 
      26th Jun 2007
the result I get now is 1.18078175895767 (0.0290000000000004). the result I
expected is 1.18 (0.0290).


"Vasant Nanavati" wrote:

> What is the result that you are getting and what are you expecting?
> ________________________________________________________________________
>
> "ViestaWu" <(E-Mail Removed)> wrote in message
> news:0B03FFFD-A7B2-4877-814D-(E-Mail Removed)...
> > =IF(C3<>0, (C3-C2)/B2*100 & " (" & C3-C2 & ")","")
> >
> > This is the function I used at this moment. but it has some problem. all
> > data in column B & C are number format with no more than 4 decimal digits,
> > so
> > that both (C3-C2)/B2*100 and C3-C2 are still number, especially without
> > decimal digits control.
> >
> > The result I expected is for example when C3 = 2.5350 and C2 = 2.5060 and
> > B2
> > = 2.456, the result shows me "1.18 (0.0290)". 2 decimal digits in the
> > first
> > part, 4 decimal digits in the second part. Besides, it is possible that C3
> > is
> > smaller than C2, so that the negative number is also expected if it
> > happens.
> >
> > Who can help me to realize this result?
> >
> > Thanks go to anyone who think about my troubles!
> >
> > Best Regards,
> > Viesta Wu

>
>
>

 
Reply With Quote
 
Vasant Nanavati
Guest
Posts: n/a
 
      26th Jun 2007
Try (untested):

=IF(C3<>0, TEXT((C3-C2)/B2*100,"0.00") & " (" & TEXT(C3-C2,"0.0000" &
")","")
___________________________________________________________________________


"ViestaWu" <(E-Mail Removed)> wrote in message
news:5C089276-3804-4896-8473-(E-Mail Removed)...
> the result I get now is 1.18078175895767 (0.0290000000000004). the result
> I
> expected is 1.18 (0.0290).
>
>
> "Vasant Nanavati" wrote:
>
>> What is the result that you are getting and what are you expecting?
>> ________________________________________________________________________
>>
>> "ViestaWu" <(E-Mail Removed)> wrote in message
>> news:0B03FFFD-A7B2-4877-814D-(E-Mail Removed)...
>> > =IF(C3<>0, (C3-C2)/B2*100 & " (" & C3-C2 & ")","")
>> >
>> > This is the function I used at this moment. but it has some problem.
>> > all
>> > data in column B & C are number format with no more than 4 decimal
>> > digits,
>> > so
>> > that both (C3-C2)/B2*100 and C3-C2 are still number, especially without
>> > decimal digits control.
>> >
>> > The result I expected is for example when C3 = 2.5350 and C2 = 2.5060
>> > and
>> > B2
>> > = 2.456, the result shows me "1.18 (0.0290)". 2 decimal digits in the
>> > first
>> > part, 4 decimal digits in the second part. Besides, it is possible that
>> > C3
>> > is
>> > smaller than C2, so that the negative number is also expected if it
>> > happens.
>> >
>> > Who can help me to realize this result?
>> >
>> > Thanks go to anyone who think about my troubles!
>> >
>> > Best Regards,
>> > Viesta Wu

>>
>>
>>



 
Reply With Quote
 
=?Utf-8?B?VGVldGhsZXNzIG1hbWE=?=
Guest
Posts: n/a
 
      26th Jun 2007
=IF(C3<>0,TEXT((C3-C2)/B2*100,"0.00 (")&TEXT(C3-C2,"0.0000)"),"")


"ViestaWu" wrote:

> =IF(C3<>0, (C3-C2)/B2*100 & " (" & C3-C2 & ")","")
>
> This is the function I used at this moment. but it has some problem. all
> data in column B & C are number format with no more than 4 decimal digits, so
> that both (C3-C2)/B2*100 and C3-C2 are still number, especially without
> decimal digits control.
>
> The result I expected is for example when C3 = 2.5350 and C2 = 2.5060 and B2
> = 2.456, the result shows me "1.18 (0.0290)". 2 decimal digits in the first
> part, 4 decimal digits in the second part. Besides, it is possible that C3 is
> smaller than C2, so that the negative number is also expected if it happens.
>
> Who can help me to realize this result?
>
> Thanks go to anyone who think about my troubles!
>
> Best Regards,
> Viesta Wu

 
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
Change Date Format to Specific Text Format When Copying adambush4242@hotmail.com Microsoft Excel Misc 3 23rd Dec 2008 03:43 PM
Change number (in text format) to numeric format =?Utf-8?B?UGFt?= Microsoft Excel Misc 5 24th Oct 2005 07:45 PM
How do i change numbers in text format to number format? =?Utf-8?B?R3JlZw==?= Microsoft Excel New Users 1 14th Dec 2004 05:22 PM
formula/function to change a number formatted as text to being an actual number =?Utf-8?B?Sm9l?= Microsoft Excel Misc 2 16th Dec 2003 07:51 PM
make table query - change number format to text format Mark Microsoft Access Queries 1 13th Dec 2003 12:10 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:50 PM.