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 rounding up/rounding down/half adjust the numeric expression, just like the following:
round(10.123678, 3, rounddown), it will return 10.123
round(10.123678, 3, halfadjust), it will return 10.124
round(10.123678, 3, roundup), it will return 10.124
Does VB has such round function?
Thank you
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
Round function does not round properly! -
I'm making an app that has to calculate taxes, GST & PST, and for Ontario (where the PST is 1%) I kept getting 1 cent less than what I was supposed to...
This is what I calculated when I saw the problem:
58.5 * 0.07 = 4.095
And wanted it to round it to 2 decimals, and this
I discovered a bug in MS Visual Basic 6.0. (ROUNDING) -
In the VBA Library, in the Classes, Math. There is a bug with the Round function.
Try this, Round(1.5,0) and Round(2.5,0)
Round(1.5,0) = 2
Round(2.5,0) = 2
For a fraction with 1, it rounds up, otherwise it rounds down?
***?
Round function in vb 6 -
i'm trying to get values rounded to whole numbers but i want to get
43.1 to 44
43.4 to 44
43.9 to 44
means always get next whole number
for this how could i use round function ... if round function could not do so then is there any other function in vb 6 that help me
Th
Round-function -
Hello,
as some of you will know the Round-function in VB is not optimized.
When you round the digit 155,805 on 2 decimals it returns 155,80. In some cases this is right, but i want it to return 155,81.
Has anyone already had this problem?
Maybe you can help me with a new functio
sql formatting -
Hi Pierre
All you need to do is use the ROUND function
ROUND(numeric_expression, length)
eg.
SELECT ROUND(Column1,2) FROM Table
Will round Column to 2 Decimal places
Hope it helps
Ian
Custom Round Function -
Hi, I need a vb 2005 function to round certain numbers up to the next number of the highest order of magnitude contained in the number. Here are a few examples of input/output that the function should produce.
1. In >> 3.4, out >> 4.0
2. In >> 0.1, out >> 0.
Rounding to Halves -
Can anyone think of a good way to do this? I'm struggling.
I'm trying to write a function that will round a number to an integer or .5 for example:
3.2342 would round to 3.0
3.3453 would round to 3.5
3.6345 would round to 3.5
3.7666 would round to 4.0
you know what I
Using Round Fuction -
Hi,
i want to round a currency value to the nearest largest number
For Example
218.5 means we need to get 219
i tried Round function also but i did not get the desired result, is there any other function available for this.
please, can any one help me out.
Regarding usage of Round function -
Hi,
I' m using Visual basic 6.0 as front end and Sql Server 7.0 as back end. The Round function of VB and Sql behaves in different manner. For example round(10.25, 1) returns 10.3 in sql server and 10.2 in visual basic. So i stopped using VB round function and started using the s
Round Up -
using round (0.5) will give a result of '0'.
I understand that using 'round' will round the value to its nearest even number.
Is there a command to round up a value as below:
e.g. round 0.5 = 1
round 2.5 = 3
round off function (dissolved) -
i think this is simple but i'm in a hurry.
Is there any function that round off a numbers? let say i have this 53.25 and if i round of the output would be this 50.00.
hope someone can help me.
Round number -
This should be easy, using vbscript, how can I round a number poperly? FormatNumber() works in VB, but not in vbscript, the round() function doesn't round properly. For instance, 6.5 should round to 7. How can I get this to happen?
rounding to a specific place -
when I have cin >> dprice; get a double value and I type in 8.88, it gets immediately stored as 8.8800000000000008. Now the real questions about this would be like why does it do that, why don't they fix that, and why do people still use C++ when it does stuff like that?
But my
Round up and Round down a double to a specific number of decimal places -
Hello,
i am trying to find a function to round up or down a double to a specified number of decimal places, for example:
round up to 4 decimal places:
roundup(1.23212, 4) should result in 1.2322
or round down to 2 decimal places:
rounddown(122.2389, 2) should result in 122.2
Rounding down -
I have a var defined as double - I am using the round() function to set the resulting var to 1 dec place eg :
TempCalc = round( 0.15 , 1 )
Std VB setting is to round up to 0.2 - but is there a setting I can use to round down in this instance - ie the result I want is 0.1
If th
math.round (*,-2) trimming 2 decimal places on the left -
well i noticed the round function in excel does that
for eg round(21.5,-1) wud give the result 20
how can i use math.round in vb to do that??
kindly help
cheers
If there is a decimal point is it possible to round up! -
I am trying to round up a number for example 7.2 to 8 using excel is there a way to do this or will i need some kind of vb code ? p.s i have tried using the ROUNDUP function to round up 7.2 to 8 but it rounded to 7.
thanks before handing
madspof
Round function equivalent in VB5 -
Hail,
What would be the equivalent of the round function used in vb6 for vb5:
sec = Round(Mid$(P, 1, Len(P)) / 1000)
Code taken from MP3 player...
Phailak
adding two double values -
hi everybody,
can any one help me with this double addition problem
....................
Private Sub Command1_Click()
Dim i, j As Double
i = 40
j = -40.01
lblTotalBalance.Caption = Round(i, 2) + Round(j, 2)
End Sub
Function Roun
Rounding a number up to next integer -
I am using VB6 professional and need to round a number up to the next integer. I understand that the Round Function will round down for decimals less than 0.5 and round up for decimals 0.5 or greater. I need to round up to the next integer for all decimal values, no matter how small (o
Round up values -
Hi all,
How do you to round up values in VB6?
For instance:
1234.5678 round up to 1234.57
12345678 round up to 12300000
Is there a dedicated function for this? Can anyone help?
Thanks.
round up *resolved* -
The round function is rounding 2.25 to 2.2 when using 1 decimal place...
round(2.25,1) results in 2.2
how can i round the second decimal place up so it would result in 2.3?
round function -
Hello
can anyone tell me if the result of a calculation returns a value of say 62.05 (could be anything)is it possible to use the round function to make the result always round up eg:63 rather than 62?
Thanks
round, filled up with zero's -
Hi,
With the use of the round() command you can enter the number of digit's the integer should have behind the floating point.
for example:
round(27.453,2) becomes 27.45
but if you have a number with less characters behind the floating point than the entered number it doesn
Round Function in VB -
Hi,
I am using round(31.5) which should give me = 32
but it gives me 31
if i try round(31.51) it gives me = 32
Any one who can help me ????
SQL Server 2005 view question -
Hi!
I have two tables where a column is declared as decimal(25,10)
In a view I perform a union of these two tables, and the user also want the column to be rounded into two decimals.
When I first used the ROUND() function SQL server indeed rounded the number, but it kept the e
Round with 4 significative digit -
Hi,
The Round() function of Vb is done to keep a specific number of decimal. In my situation, I want to keep a specific number au significative digit.
Round(12.598763, 4) = 12.5988 I want : 12.60
Round(0.00012389, 4) = 0.0001 I want : 0.0001239
How may I do it ?
Than
rounding -
In C++ there is a ceiling function that allows one to always round a number up. Example: if the number is 11.1 ceiling will round to 12. I know about Round(number,0) and Format(number,"###.") , but these will round a number less that .5 down to the next lowest integer. Is the
Rounding off problem -
Hi everybody,
The Round function seems to be not working as expected:
1) Round( 42.5, 0 ) returns 42, whereas it should be 43.
2) Round( 42.55, 1 ) returns 42.6, but Round( 42.45, 1 ) returns 42.4.
How to get around this problem?
rounding up (.5) -
Anyone have a very simple solution that rounds up to the nearest .5.
For example...
x = 1.3 would round up to x = 1.5
x = 1.01 would round up to x = 1.5
x = 1.51 would round up to x = 2
x = 1.99 would round up to x = 2
Thanks for any help...
[2008] Rounding to the nearest half (0.5) -
Hey guys,
I am reading the temperature of a device and the values are rounding to 1 decimal place. For example, right now it's 13.8 degrees.
What I want to do is round to the nearest half of a degree, so using the 13 degree mark as an example:13.1, round to 13.0
13.2, round to 13.0
DateDiff in .net seems to round down how can i make it round up! -
DateDiff in .net seems to round down how can i make it round up!?:
e.g difference is 21.51 but date diff returns 21
i want it to round correctly ie give me 22mins.
Any trick to get this behaviour??
Round funcion -
Hello everybody, I'm new on this forum and have a question. I just started with Visual Basic so I suck at it...
---If my question isn't right, or my english just sucks, please look at the picture i've attached...-----
I've made this program that allows you to calculate how muc
Select ceiling figure in Rounding method -
Is there a function that return the ceiling value from a decimal value. The Round function in VB will round it to its closest value (which is not what i want). Thanks.
round function of access 2000 not working in execute command of ado -
Im using an ado connection to an access 2000 database using the jet 4 as my provider. I would like to ask as why is the round function not supported when creating an sql-statement? The round function is working inside the query of an access database but why not when passing an sql-st
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
Round Function -
When I use the round function it is rounding decimals that end with .5 down not up, can any one tell my why, and even better how to fix this. Thanks.
Always round numbers down. -
Any way of always rounding a number down? The Round function rounds the number depenfing on which whole number is closest. I want something to round nmy number down always.
Thanks.
Round number up to next full dollar -
I need a function that will round a currency value upto the next full dollar;
Like this 13,323.44 would round to 13324.00
How would i do that?