I need to create a custom roundup function that works exactly the same as the built-in ROUNUP function in Excel (ex. 98.37 rounds up to 99.00% in excel). I tried the following code but it always rounds up to 100%
How do I write this so a number like 98.37 or 98.01 rounds up to 99%, but I can't have any number over 100%.Code:Public Function roundup(number) As Long If Int(number) < number Then roundup = Int(number) + 1 Else roundup = number End If End Function
Thanks so much for your help.
Nena