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