What would be best way to round to nearest hundred? or does anyone have code already?
Thanks
Rounding to nearest hudred
Rounding to nearest hudred
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: Rounding to nearest hudred
Code: Select all
a.i = 349
Debug (a+50)/100*100
Code: Select all
a.d = 349
a = Round (a/100, #PB_Round_Nearest) * 100
Debug a
sorry for my bad english
Re: Rounding to nearest hudred
ThanksJosh wrote:Code: Select all
a.i = 349 Debug (a+50)/100*100
Code: Select all
a.d = 349 a = Round (a/100, #PB_Round_Nearest) * 100 Debug a
WARNING: I dont know what I am doing! I just put stuff here and there and sometimes like magic it works. So please improve on my code and post your changes so I can learn more. TIA
Re: Rounding to nearest hudred
sorry for my bad english
Re: Rounding to nearest hudred
How about:
Code: Select all
a = Int(35566*0.01)
Debug a
If it's falling over......just remember the computer is never wrong!