PC Review
Forums
Newsgroups
Microsoft Access
Microsoft Access Getting Started
How to use ceiling function in access
Forums
Newsgroups
Microsoft Access
Microsoft Access Getting Started
How to use ceiling function in access
![]() |
How to use ceiling function in access |
|
|
Thread Tools | Rate Thread |
|
|
#1 |
|
Guest
Posts: n/a
|
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 |
|
|
|
#2 |
|
Guest
Posts: n/a
|
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 "Suresh" <anonymous@discussions.microsoft.com> wrote in message news:8878624B-72CD-4BF4-B7D8-6C73AAEAD57A@microsoft.com... > Hi, > > I have a problem using ceiling function in access > > for the given values i have to change them into multiples of 6 > in excel its possible by using =ceiling($D1,6) where D1 is the say 1 and the result is 6 > Before ceiling after ceiling > 0 = 0 > 1 = 6 > 7 = 12 > 13 = 18 > > please help how to get that |
|
![]() |
|
| Thread Tools | |
| Rate This Thread | |
|
|

Main Page 

