This is probably an easy fix but I can't seem to get it working.
I want to divide column A by 10 but I want my new column to show the decimal places. Right now it is showing 5 deciaml places but only as zero.
When I divide 3/10 I want the new column to show 0.3 but right now its just showing 0.00000
asked Oct 11 '11 at 08:39 AM in Default
This happens because your ColumnA is int and 10 is implicitly int as well. Try this instead, and you will get results you want:
The idea is that when you divide by 10.0 rather than by 10 then you avoid the integer division because the decimals are higher in the food chain than integers.
You need to cast each number to decimal as well as the total, for example:
answered Oct 11 '11 at 08:45 AM