wierd data type???

ZacCerrato

Board Regular
Joined
Jun 2, 2010
Messages
76
I have a strange occurance and I wonder if one of you has come accross something like this:

I have a spreadsheet that I use to calculate an amount of money owed. The final cell that holds the total amount due is based on calculations from a few other cells. For instance:

Cell A1 = 1.32
Cell B1 = $15.00
Cell C1 =
Code:
=(A1*B1)
= $19.80 (Which is my total).

In the cell, in the spreadsheet this total appears as $19.80 or 19.80 (depending on if the cell is formatted as "General" or "Currency") However, when I copy this value and paste it into another cell on another spreadsheet...or I draw this cell's value to insert it into a Microsoft mail-merge, the value always appears with a huge number of decimal places, e.g. "19.800000000001".

Does anyone know why this may be occuring and how I could fix it? I've tried tons of different combinations for how the data is formatted (Number, General, Currency, etc.) but none of this has worked. Might it have something to do with how the data is formatted behind the scenes? (i.e. byte, interger, long, etc.)???
 

Excel Facts

Move date out one month or year
Use =EDATE(A2,1) for one month later. Use EDATE(A2,12) for one year later.
ZacCerrato
No idea why that is occuring. Never seen it before. But using formula
=Fixed(A1*B1,2)
should fix it
 
Upvote 0
You can also set the number format in Word in the field code for the merge field.
 
Upvote 0

Forum statistics

Threads
1,224,521
Messages
6,179,291
Members
452,902
Latest member
Knuddeluff

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top