-
Integer Problem
I have some calculations that are returning a number very near an integer, which is feeding into a variable that is defined as an integer. I am using CInt() but the unrounded number is feeding through. I have also tried Worksheets.Application.Round(). Neither are working.
Thoughts?
-
Re: Integer Problem
Thread moved from the FAQ forum, which is not the place to post your questions.
Care to show us the code, and let us know what the values before & after are?
-
Re: Integer Problem
a variable declared as an integer can not hold any decimal part
so do you mean sometimes the integer is rounded up and sometimes rounded down?
if you want always rounded down, use fix()
-
Re: Integer Problem
Are you looking for a whole number or a decimal?