Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
This is probably not a perfect implementation - but I hope it gives you some
ideas: Public Function MyCeiling(dblInputVal As Double, dblCeiling As Double) As Double Dim dbltemp As Double Dim lngtemp As Long Dim dblOutVal As Double lngtemp = Int((dblInputVal / dblCeiling)) dbltemp = (dblInputVal / dblCeiling) If lngtemp < dbltemp Or lngtemp = 0 Then dblOutVal = dblCeiling * (lngtemp + 1) Else dblOutVal = dblCeiling * lngtemp End If MyCeiling = dblOutVal End Function |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
User defined functions without using VBA. | Excel Programming | |||
User Defined Functions - Help Text - Make it Easy for the User | Excel Programming | |||
User defined functions | Excel Programming | |||
excel functions and User defined functions | Excel Programming | |||
User Defined Functions | Excel Programming |