Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / New Users / April 2004

Tip: Looking for answers? Try searching our database.

How to use ceiling function in access

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Suresh - 15 Apr 2004 06:51 GMT
Hi,

I have a problem using ceiling function in acces

for the given values i have to change them into multiples of
in excel its possible by using =ceiling($D1,6) where D1 is the say 1 and the result is
Before ceiling       after ceilin
0                    =          
1                    =          
7                    =         1
13                  =         1

please help how to get that
Nikos Yannacopoulos - 15 Apr 2004 11:21 GMT
Suresh,

To be honest I wasn't aware of this function in Excel either, and from what
you say chances are it doesn't exist at all in Access, but it's very easy to
add it a user-defined one!
In the database window, go to Modules and add a new module, and paste the
following code in it:

Function ceiling(arg1, arg2)
   arg2 = 6
   intpart = Int(arg1 / arg2)
   If arg1 Mod arg2 <> 0 Then
       decpart = 1
   Else
       decpart = 0
   End If
   ceiling = (intpart + decpart) * arg2
End Function

Save. Now you can call your ceiling function from anywhere in the database,
with the same syntax as in Excel.

HTH,
Nikos

> Hi,
>
[quoted text clipped - 9 lines]
>
> please help how to get that
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.