-1

I am very new to Excel and I have a problem with a simple multiplication (I know, it is depressing but I'm stuck).

I have to multiply the numeric content of 2 cells (these value are calculated using 2 different formulas).

The problem is that it seems that these 2 cells contain numeric values having different format and I obtain a strange result.

Infact I have:

1) The K3 cell containing this value: 0,0783272400

2) The K6 cell containing this value: 728.454911165

In another cell I simply do:

=K3*K6

but now I am obtaining this nonsense value: 57.057.862.655,9996000000

I think that the problem could be related to the fact that the first one use the , do divide integer section and decimal section, and in the other one I am using . to divider the integer section and decimal section.

How can I correctly handle this situation?

AndreaNobili
  • 40,955
  • 107
  • 324
  • 596

2 Answers2

0

Format both values as Currency in Excel and forget about the issue.

You are getting it, because the floating point values are not represented differently in many programming languages. In Excel probably the best way to make sure you do not give strange values is to format as Currency.

Or in VBA to use the CDec and to convert to decimal.

Is floating point math broken?

Vityata
  • 42,633
  • 8
  • 55
  • 100
0

Excel is treating 0,0783272400 as something less than one tenth and 728.454911165 as getting on for one thousand billion. The result is formatted with . for thousands separator and , for decimal separator - and is not nonsensical (though the choice of formatting is).

pnuts
  • 58,317
  • 11
  • 87
  • 139