Login or Sign Up
Logging in...
Remember me
Log in
Or
Sign Up
Forgot password or user name?
Log in with
Search in titles only
Search in Visual Basic only
Search
Advanced Search
Forums
Product Launch
Updates
Today's Posts
Member List
Calendar
Home
Forum
Topic
Visual Basic
rounding numbers
Collapse
X
Collapse
Posts
Latest Activity
Photos
Page
of
1
Filter
Time
All Time
Today
Last Week
Last Month
Show
All
Discussions only
Photos only
Videos only
Links only
Polls only
Events only
Filtered by:
Clear All
new posts
Previous
template
Next
ybhag
New Member
Join Date:
Oct 2006
Posts:
4
#1
rounding numbers
Oct 8 '06, 10:40 AM
I would like to know how to round numbers. If the number is greater or equal to then 10028.50 then it should should 10029
thanks
Dawoodoz
New Member
Join Date:
Oct 2006
Posts:
14
#2
Oct 8 '06, 03:26 PM
I dont remember the exact word but i can look it up if you dont have the MSDN discs. "int" is the floor but you wanted the roof if I understand.
Comment
Post
Cancel
Clay Soyle
New Member
Join Date:
Oct 2006
Posts:
7
#3
Oct 10 '06, 11:12 AM
Try this:
Num = 1234.56
Num = Int(Num + 0.5)
Hope this helps,
Clay Soyle
Comment
Post
Cancel
scripto
New Member
Join Date:
Oct 2006
Posts:
143
#4
Oct 10 '06, 03:26 PM
In VB use the Round() function - easier.
Comment
Post
Cancel
Hemant Pathak
Recognized Expert
New Member
Join Date:
Jul 2006
Posts:
92
#5
Oct 10 '06, 03:41 PM
Hi............. ............... .
Private Sub Command1_Click( )
Dim a As Double
a = 1230.51
Debug.Print Round(a, 0)
Ans=1230
a = 1230.5
Debug.Print Round(a, 0)
Ans=1231
End Sub
Comment
Post
Cancel
Previous
template
Next
Working...
Yes
No
OK
OK
Cancel
👍
👎
☕
Comment