Help with Calculations [Resolved]

Posted by Vuyiswamb under Sql Server on 3/22/2012 | Points: 10 | Views : 886 | Status : [Member] [MVP] [Administrator] | Replies : 7
I need your help . i have a spreadsheet In the Spread Sheet in the First line there is a field "Unit Type Total PQ".

That field is calculated from =F2*D2 and the value of F2 = 0.05 and D2 = 12 so Excel reports that the Field "Unit Type Total PQ" results into 0.56.

If I take a CALCULATOR and multiply 0.05 * 12 I get 0.6

And if I go to SQL I get with this

SELECT  CONVERT(DECIMAL(10,2),0.05) * 12


I get 0.60

Why is Excell giving me Incorrect values or how can i fix my SQL
<pre lang="java"></pre>

Thank you for posting at Dotnetfunda
[Administrator]



Responses

Posted by: Sksamantaray on: 3/22/2012 [Member] Silver | Points: 50

Up
0
Down

Resolved
Hi Vuyiswamb
To get the value to 0.60 , you need to write the formula as:
=ROUND(F2,2)*D2


Thanks,
Sanjay

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/22/2012 [Member] Silver | Points: 25

Up
0
Down
Hi Administrator,
Your Cell property might have been changed, its working fine.
I have attached a sheet please check.

Right Click on the cell---go to formatcells ----select number---decimal---2 ---ok and check
 Download source file

Thanks,
Sanjay

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 3/22/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
hi

i understand that , but look at the attached spreadsheet and tell me why is that not 0.60

 Download source file

Thank you for posting at Dotnetfunda
[Administrator]

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/22/2012 [Member] Silver | Points: 25

Up
0
Down
Hi ,
Since you have calculation at F2 and F3 whose exact value is 0.0463 and 0.0556 respectively not 0.05 and 0.06, though it looks to be.
Hope it helps.



Thanks,
Sanjay

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Patnaik.Jyoti on: 3/26/2012 [Member] Starter | Points: 25

Up
0
Down
Hi,
Did you solve this problem?

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sksamantaray on: 3/26/2012 [Member] Silver | Points: 25

Up
0
Down
Hi,Vuyiswamb
Share if you have got any solution to it?

Thanks,
Sanjay

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Vuyiswamb on: 3/26/2012 [Member] [MVP] [Administrator] NotApplicable | Points: 25

Up
0
Down
Yes thanks

Thank you for posting at Dotnetfunda
[Administrator]

Vuyiswamb, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response