Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 56
Default User Defined Functions

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
User defined functions without using VBA. [email protected] Excel Programming 0 June 13th 06 05:42 PM
User Defined Functions - Help Text - Make it Easy for the User Andibevan[_2_] Excel Programming 4 March 17th 05 09:51 AM
User defined functions big t Excel Programming 3 September 29th 04 11:40 AM
excel functions and User defined functions Kanan Excel Programming 4 May 20th 04 11:21 PM
User Defined Functions KMcNelson Excel Programming 4 February 23rd 04 09:09 PM


All times are GMT +1. The time now is 09:25 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"