ok i know this is probably really easy but I am floundering.. I have a series of variables that have a decimal point and a few zeros. How do I strip the variable so it goes from 1.000 to 1 ? Dont think this is that important but the numbers are generated from an xml file that I am grabbing with jquery like ...
var quantity = $("QTY",this).text();
Thanks in advance for any help!
Step 1: Write down the decimal divided by 1. Step 2: Multiply both top and bottom by 10 for every number after the decimal point. (For example, if there are two numbers after the decimal point, then use 100, if there are three then use 1000, etc.) Step 3: Simplify (or reduce) the Rational number.
Right click on one of the decimal value on the graph and go to format y/x axis and under number tab you have an option to make the decimal places to 0.
Use the ROUND function (or whichever equivalent function is available in VBA). I have variable to integer so it removes it but it rounds it.
Simply...
Math.round(quantity);
...assuming you want to round 1.7
to 2
. If not, use Math.floor
for 1.7
to 1
.
use parseInt();
parseInt("1.25");//returns 1 parseInt("1.85");//returns 1 parseInt(1.25);//returns 1 parseInt(1.85);//returns 1
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With