How do I simulate Excel's Ceiling/Floor Functions in VBA ...- Tek-Tips

How do I simulate Excel's Ceiling/Floor Functions in VBA ...- Tek-Tips

瀏覽:1261
日期:2026-04-22
Public Function Ceiling(ByVal X As Double, Optional ByVal Factor As Double = 1) As Double ' X is the value you want to round ' is the multiple to which you want to round Ceiling = (Int(X / Factor) - (X / Factor - Int(X / Factor) > 0)) * Factor End Functio...看更多