Concatenating a Calculation with Text causes the Calculation to be incorrect??

N

Nelson

In one cell I type this:
=MOD(413.224,1)*250

The correct result appears:
56

If I put this same formula into another cell with concatenating text:
=MOD(413.224,1)*250 & " LF"

The incorrect result appears:
55.9999999999974 LF


The result I am looking for is:
56 LF


Why the incorrect calculation? Am I doing something wrong? How can I get
the value I want?
 
V

Vasant Nanavati

Try:

=TEXT(MOD(413.224,1)*250,"#,##0") & " LF"

Excel's binary arithmetic cannot add decimals accurately. The reason you are
getting the "correct" answer in the first instance is probably because of
the way the cell is formatted for numbers.
 
N

Nelson

Thanks everyone! I used the Text function as you explained. Thanks for
giving me the example too!

Chris
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top