Hello and welcome to our community! Is this your first visit?
Enjoy an ad free experience by logging in. Not a member yet? Register.

# Thread: how do i used round function()

1. ## how do i used round function()

Hello all supporter

take the amount entered and add 100 to arrive at X. Round X up to the nearest 500.

let say i have 4010 + 100 = 4110 from 4110 how do i round up to 4500

some examples so you can have a picture what i'm talking about:

4250 + 100 = 4350 how do i round up to 4500
6600 + 100 = 6700 how do i round up to 7000
7100 + 100 = 7200 how do i round up to 7500

please help me as you can, thanks

• I don't believe the round() function is the solution here. I would suggest something along these lines:

Function round500(intInput)

If intInput mod 500 = 0 then 'check if input is exactly divisible by 500

round500 = intInput

Else

intDivided = round(intInput/500) 'divide input by 500 and return integer value repesenting number of 500's that go into that number

round500 = (intDivided*1000) + 500

End if

End function

Use the function thus:

For this - 4250 + 100 = 4350 how do i round up to 4500 - use:

round500(4350)

Just noticed that I use round() in this function, so I guess you were working along the right lines!

•

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•