Issue 92163 - Calc fails to calculate simple formula
Calc fails to calculate simple formula
 Status: CLOSED DUPLICATE of issue 5658 None Calc Application code (show other issues) OOo 3.0 Beta 2 PC Windows XP P3 Trivial (vote) --- spreadsheet issues@sc oooqa

 Reported: 2008-07-26 06:24 UTC by testerh 2008-07-29 13:17 UTC (History) 2 users (show) issues rb.henschel DEFECT --- ---

Attachments
Testcase for wrong formula evaluation (6.99 KB, application/vnd.oasis.opendocument.spreadsheet)
2008-07-26 13:36 UTC, testerh
no flags Details

 Note You need to log in before you can comment on or make changes to this issue.
 testerh 2008-07-26 06:24:15 UTC ```Steps to reproduce: 1. Create a new spreadsheet 2. In cell C1, enter 100 3. In cell D1, enter the text HUF 4. In cell E1, enter this formnula: =IF(D1="HUF";"0.20";"0.00") 5. In cell F1, enter this formula: =(1+E1)*C1 As a result, E1 becomes 0.20, which is OK. However, F1 shows a value of 100. Expected: F1 should become (1 + 0.20)*100 = 120``` Regina Henschel 2008-07-26 11:15:20 UTC ```If you want a number, you must write it as number. "0.2" is a text and texts are treated as zero if you try to calculate with them. Correct: =IF(D1="HUF";0.20;0.00)``` Regina Henschel 2008-07-26 11:16:41 UTC `Closing. Error in using formula` testerh 2008-07-26 13:36:23 UTC ```Created attachment 55377 [details] Testcase for wrong formula evaluation``` testerh 2008-07-26 13:37:34 UTC ```Clarification: I initially used Calc to open an MS Office 2000 Excel spreadsheet that had the formulas decribed above. The formula worked fine in Excel. I noticed the problem (calculated field wrong), created a new Calc spreadsheet, and copied over the formula from the Excel spreadsheet to verify the behavior. Please check the test case I just attached. Language for the cells is Hungarian, but that shouldn't affect the behavior.``` Regina Henschel 2008-07-26 14:41:16 UTC ```Importing from Excel is a problem, see issue 5658. You will have to correct your spreadsheet, to use numbers where you will calculate with them. *** This issue has been marked as a duplicate of 5658 ***``` Regina Henschel 2008-07-26 14:42:46 UTC ```closing duplicate. You might vote for issue 5658 to get a better solution for importing Excel spreadsheets.``` oc 2008-07-29 13:17:14 UTC `closed as duplicate`