Community
Dynamic Blocks Forum
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Vba Round-function question

1 REPLY 1
SOLVED
Reply
Message 1 of 2
Anonymous
733 Views, 1 Reply

Vba Round-function question

Hello 

 

I am using the function Round. 

But when i have 19.6 the function makes it 20

 

Now is my question:

How can i say to the round function to make 19.6 to 19?

 

i have this code. but round.Down does not work

MaatRijboring = frmKast.txtHoogte - frmKast.txtOnder1 - frmKast.txtBoven1
Tussenstap1 = (MaatRijboring / 32)
Tussenstap2 = Round(Tussenstap1)
Tussenstap3 = (Tussenstap2 * 32)
spelingRijboring = (MaatRijboring - Tussenstap3) / 2

 

How can i solve this?

1 REPLY 1
Message 2 of 2
Libbya
in reply to: Anonymous

I'm not familiar with VBA, but if you subtract 0.5 from the number you want to round prior to rounding it off it will accomplish the same result as always rounding down.  

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

”Boost

 

”Tips

 

”Services