Mar 20, 2006 #1 kayek Programmer Joined Jun 19, 2003 Messages 95 Location US How do you round a number to the nearest thousand. For Example: round 96,452 to 96,000 round 96,500 to 97,000
How do you round a number to the nearest thousand. For Example: round 96,452 to 96,000 round 96,500 to 97,000
Mar 20, 2006 #2 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR To avoid the "bank rounding" behaviour of the Round function: 1000*((yourNumber+500)\1000) Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
To avoid the "bank rounding" behaviour of the Round function: 1000*((yourNumber+500)\1000) Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Mar 20, 2006 #3 stix4t2 Programmer Joined Feb 23, 2006 Messages 318 Location US PHV, I thought you had to convert the number to integer before multiplying. 1000*clng((yourNumber+500)\1000) Upvote 0 Downvote
PHV, I thought you had to convert the number to integer before multiplying. 1000*clng((yourNumber+500)\1000)
Mar 20, 2006 #4 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR stix4t2: 1000*((yourNumber+500)[!]\[/!]1000) The result of an integral division is already integral ... Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
stix4t2: 1000*((yourNumber+500)[!]\[/!]1000) The result of an integral division is already integral ... Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886