PC Review


Reply
Thread Tools Rate Thread

How to use ceiling function in access

 
 
=?Utf-8?B?U3VyZXNo?=
Guest
Posts: n/a
 
      15th Apr 2004
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
 
Reply With Quote
 
 
 
 
Nikos Yannacopoulos
Guest
Posts: n/a
 
      15th Apr 2004
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" <(E-Mail Removed)> wrote in message
news:8878624B-72CD-4BF4-B7D8-(E-Mail Removed)...
> 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



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to use function ceiling?? keys2000 Microsoft Excel Misc 4 7th Jun 2009 06:20 PM
Ceiling function in Access Paul LeBlanc Microsoft Access VBA Modules 1 19th Mar 2008 07:35 PM
what is the equivalent of ceiling function of excel in access? =?Utf-8?B?c2h1YmhhbQ==?= Microsoft Access Queries 2 1st Jun 2007 03:51 AM
how to use the ceiling function =?Utf-8?B?TGFycnk=?= Microsoft Excel Worksheet Functions 2 11th Apr 2007 08:34 PM
Re: CEILING Function Brendan Reynolds Microsoft Access 0 14th Apr 2004 08:28 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 06:44 AM.