troubleshooting Question

How do I round to then nearest hundred?

Avatar of indy500fan
indy500fan asked on
Visual Basic.NET
11 Comments2 Solutions716 ViewsLast Modified:
Friends,

I have the following block of code:

    Private Sub CalculatePreQualifyingMoneyPayoutBelowFirstPlace(ByVal Position As Integer)
        BasePayout = GetBaseAmount(Position)
        MultiplicationOfBasePayoutAndPurseRemainder = BasePayout * PurseRemainder
        AdditionalPayout = MultiplicationOfBasePayoutAndPurseRemainder / QualifyingMoneyTotal
        AdditionalPayout = Math.Round(AdditionalPayout)
    End Sub

Now, it should round to the value of AdditionalPayout up, but how do I do it to the nearest hundred?  Now, this doesn't mean the nearest hundredth, it means to the nearest 100.

For example,

Assume the following
Dim BasePayout, PurseRemainder, MultiplicationOfBasePayoutAndPurseRemainder, AdditionalPayout, QualifyingMoneyTotal as Decimal

BasePayout = 9000
PurseRemainder = 112000
QualifyingMoneyTotal = 480000

I want AdditionalPayout to equal 2300, not 2250 as the calculation, without the rounding, would total.

Thanks in advance!

Regards,
Eric


BasePayout
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 11 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 11 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros