excel vba arrondir

The solution for “excel vba arrondir” can be found here. The following code will assist you in solving the problem.

Function RoundTo(pNumber As Long, pFactor As Long)
RoundTo = Round(pNumber / pFactor) * pFactor
End Function
‘ —————————————————————
Sub TestMe()
Debug.Print RoundTo(2543, 10) ‘ => 2540
Debug.Print RoundTo(2546, 10) ‘ => 2550
End Sub

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts