o
k
q
u
e
s
t
i
o
n
s
.
c
o
m

Rounding Numbers in VB -

are you rounding or just truncating?
your example of 100.956 should round to 100.96 not 100.95
serge's code rounds which is not what your example shows

 

help my numbers are rounding off -
i'm doing a order form, they only problem i am having is my output, all the numbers are rounding off instead of showing decimals, here is my code if someone wants to look at it and tell me what i'm dong wrong, thanks.


keep from rounding -
I have some formulas outputting to a text box. The numbers keep rounding up. How do I stop this?


Rounding Numbers in VB -
are you rounding or just truncating? your example of 100.956 should round to 100.96 not 100.95 serge's code rounds which is not what your example shows


Rounding Numbers Within A Textbox -
Hi, Im fairly new to vb.NET, The problem I have is that I want to round a number down instead of it being rounded up. I want to round 10.389 to 10.38 instead of it rounding to 10.39, is this possible? thanks in advance.


stop rounding up -
I have some formulas outputting to a text box. The numbers keep rounding up. How do I stop this?


Silly question (Rounding) -
Have searched as always but it appears all the rounding done if for numbers like 10.34354 etc I need to round off to the nearest 10 but not least, example 10 would stay as 10 11 would be 20 3 would be 10 22 would be 30 Thanks in advance


long numbers -
i am trying to do some calculations on some very long numbers, but vb keeps rounding them e.g. 2.35541376620893E+23 i tried using the cdec command and all i get is 235541376620893000000000 i need to know what the other numbers are! they aren't zeros! Ple


Format function is rounding numbers -
Hey! Is there a way to format a number wirh a floating point without rounding it ? I thought using the format function (format(myNum, "#0.000")) will do the job, but for numbers with 4 digits after the floating point, is rounded....


Rounding numbers to 2 decimal places - how to (Rounding) -
I am returning math to a variable (and/or a text box) BUT I only want to have two or three decimal places, that are rounded off. I cant figure out how to round them. I've tried setting text box properties, calling 'as currency' but I dont know what else to do. Thank you.


Rounding - Does it or doesn't it -
I've seen a few comments on this forum that suggest the round function only rounds to the nearest even number. Is this really the case? I've tried a few experiments and, for me at least, this doesn't appear to be true. ie: round(10.6) produces 11 (not even!) print round (11.12


rounding numbers to .5 -
how can i round numbers to a half? eg. 4,48 => 4,5 4,02 => 4,0 4,95 => 5,0


Hundredth rounding in Euro Conversion -
Using Double variable to store numbers from math formulas, I'm not able to get the correct rounding from national currency to EURO. That is, when the result is, for instance, 37.42500 I should have my variable (formatted with ##0.00) equals to 37.43 . Instead, I get 37.42 that is wron


My latest invention (primarily for mathematicians) -
Don't you find numbers like 0.142857[142857]... annoying? Want to complicate your mathematics? It came to my attention that recurring decimal numbers might not be recurring in other bases, for example, the number above is just 0.17 exactly (yes you already knew that but wait, there'


Least rounded -
Which datatype is the least rounded datatype? I am doing an accounting program and the numbers I am getting are a small amount off of the numbers I found by band. Usually a couple hundred. I have tried using single and double datatype, but they give the same result. My numbers ar


rounding numbers in sql server 2000 -
Hi I am using sql server 2000. I have float field that contains a lot of data at much greater precision than is needed. E.g. there are numbers like 5.345345345343. How can I reduce this to something like 5.34435? Thanks, Alex


Rounding to nearest .25 -
Hi, I'm looking for a way to automatically round numbers and times to the nearest .25. Right now I'm simply checking the numbers. e.g. if the decimal portion <> 00 or .25 or .50 or .75 then show a message box telling the user to round the input. Likewise, minutes are checked fo


Help: Rounding problem ! -
Hi, I have an application and that give me rare rounding problem. The statement I use to rounding the value x = x + round((w * y), 2) it loop through 4 records, only two record get rounded corrrectly and the other two is not, I have no idea why. Original value Aft


Round off error -
Hi I was just wondering if anybody knows how to stop vb.net from rounding off a number as it doesn't seem to have a data type to store decimal numbers unlike vb6's real. I want to add two numbers in a calculator program I created e.g 5.5 + 5 which .net will round down to 10. Pleas


rounding and truncating help pls -
This is probably a common question but I can't find the answer. How do I round up my numbers allways. 4 4.1 4.2 4.5 4.75 4.844 need all to = 5 except when no decimal where it will = 4. VB6 ----- Thanks in advance.


My database rounds my numbers... -
Hi, i am wondering if anyone knows how to stop the database from rounding off numbers. For example, if a set a field name with data type integer to .87, the database will round that to the number 1....i changed the setting from auto decimal placement to 2 but it still rounds it off. Ca


Double to String - how do I stop rounding -
I'm writing a conversion program that requires a fairly high degree of accuracy. I am trying to information about a raster dataset in order to make a header file for an ER Mapper raster. The problem is this, some of the numbers refuse to print out as they actually are. For example: I


C++ automatically rounding off values -
how to resolve the case of c++ rounding off values, for example: cos(6.2832) i get 1 instead of .99999 and 0.1 being only 0... what should i do


AHHHHRRRGGGG, Crystal is auto rounding numbers!! -
This is weird. I don't think I pressed anything, but you never know. Today all of my decimal numbers are rounded. Yesterday, I looked at the same file, and nothing was rounded, but today rounded. What the heck? Does anyone know how to fix this? I could post the file if you need be. I a


ROUNDING NUMBERS -
I need to know how if i had the number 6.5 or 6.6 or 1.6 or 1.7 remove the tens digit without rasing or lowering the ones digit.


Rounding numbers in text box -
hi guys, how can i round the number entered in text boxes saj


Round function Question -
Dear all, I have a question about round function in VB. General Speaking, the round function is quite simple: round(10.123567,3) will return 10.124 which I believe it is using half-adjust rounding method. But right now, I need to have a rounding method function to help me rou


Rounding Problem -
Im using Visual Basic 6 and access 97 When i put a value in the textbox, for exemple 0.5 when writes this value in the database table apears 0. I think its a rounding problem, how can i solve this problem? Thanks in advance!


Floating Point Numbers -
I am experiencing a probelm where my ADO recordset is rounding numbers returned from Stored Procedure call. If I run the SP on the server and look at the data the price column is carried to more than 10 deciaml places. When I look at the data returned to the recordset the price column


Problem with rounding a number! -
In real life, When we try to round a number, let say 3.825, up to 2 decimal points, the answer is 3.83, right? Unfortunately in VB .NET, the "Math.Round" method & "Decimal.Round" method, round number like this (Read the remarks I quote from the Help file m


strip decimals -
how do you strip the digits after the decimal point off? not rounding, like if i input 9.6534 itll put out 9 or if i put in 5.1 then it will give out 5 etc. and also how do you round numbers? everything above a .5 goes up and everything below goes down?


Rounding Errors in VBA algorithms -
It has been twice now in a short period that one of my algorithms crashed because of rounding errors when using VB for my excel file. In performing simulation analysis I have to calculate the square root of a-b, where a and b can take any value on [0,1]. It can happen that both a and b


Easy and Stupid Question But....... -
Hi, I am having a problem with my database. It seems to be rounding up numbers. I have the field in the database as a number with 2 decimal places. If I enter in 7.6 it rounds it up to 8. How can I fix this? Thanks in advance. Mike


Easy date/time rounding Q. ***RESOLVED*** -
Hi I'm trying to find the most efficient way of rounding time values to the nearest hour. Eg "19:41:00" should read "20:00:00" Any pointers anyone? Thanks in advance.


cell rounding of value automatically -
Hello i am working on this worksheet, and it is rounding off the value in certain cells automatically. e.g. if i have a value 2.98 in cell c3 and i make the value of the cell in question say c56 =c3 it gives a value of 3 actually i discovered that the cell does not like any fr


Rounding down an unknown number according to its (negative) size -
Hi there, a week ago I started a thread called "Rounding up an unknown number according to its size". I wanted to find a reasonable map category upper bound for model results. For example, result 204.2 would have an upper bound of 250; 2.042 would lead to 2.5; 2,634 wou


Rounding off numbers -
Hi, guys, Im creating program that includes number... but i find it difficult when it comes to money.. can you give me a sample code that will convert the result into a money(like $125.75) if the answer is 125.7657 it will automatically round off it into $125.77?


Rounding to nearest 25,000 -
This is not an ordinary rounding issue. Here's what I need to do. I have to round any number up to the nearest 25,000 increment. For example: 124,698 would need to round to 125,000 126,125 would need to round to 150,000 1,278,189 would need to round to 1,300,000 Anyone k


Why is this rounding -
Hi, I am in the process of learning VB. I have been working on a few exercises some of which include math. I have never had a problem with VB rounding the numbers before but, when working on this exercise the numbers keep rounding. What did I do wrong and what can I do to stop this as


Format Command / Rounding Numbers -
Can anyone help me use the format command to round down and up number ? Thanks


Rounding Up and Down Conditionally -
I have a need to do conditional rounding. I need to check to see if a variable is an integer. If it is, do nothing BUT if it's not, round down to the next whole number. How can I check to see if a variable is an integer? Thanks, Jeremy