How to round to nearest integer
-
I’ve got this equation that is producing endless decimal points. I’d like the results to show only an integer with no decimal points or decimal separator (i.e., 100 instead of 100.497204820). Below is one equation I currently have. I suppose I must use the ROUND function but I’m not sure where to place it or what I have to edit once I do.
(function(){
if(fieldname11==1 && fieldname12==1){
return ((fieldname5-(fieldname5*(fieldname10/100)))*2.3);
}
if(fieldname11==1 && fieldname12==2){
return ((fieldname5-(fieldname5*(fieldname10/100)))*2.6);
}
if(fieldname11==1 && fieldname12==3){
return ((fieldname5-(fieldname5*(fieldname10/100)))*2.9);
}
if(fieldname11==2 && fieldname17==1){
return (fieldname5*2.2*.7);
}
if(fieldname11==2 && fieldname17==2){
return (fieldname5*2.2*.8);
}
if(fieldname11==2 && fieldname17==3){
return (fieldname5*2.2*.9);
}
})()
- The topic ‘How to round to nearest integer’ is closed to new replies.