Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Functions in Excel macro
Hello, I am trying to write an Excel macro. I want to use the following functions that are available in Excel. Please let me know what are the corresponding VB functions/syntax for the macro: Excel Functions: MOD(n,k) Floor(n,k) Ceiling(n,k) Thanks Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Functions in Excel macro
Hi Srikanth
You can use the Floor and Ceiling worksheet functions in VBA thus: Res = Application.WorksheetFunction.Floor(n, k) Res = Application.WorksheetFunction.Ceiling(n, k) VBA has its own Mod operator, the syntax being: Res = n Mod k --- Regards, Norman "Srikanth Ganesan" wrote in message ... Hello, I am trying to write an Excel macro. I want to use the following functions that are available in Excel. Please let me know what are the corresponding VB functions/syntax for the macro: Excel Functions: MOD(n,k) Floor(n,k) Ceiling(n,k) Thanks Srikanth *** Sent via Developersdex http://www.developersdex.com *** Don't just participate in USENET...get rewarded for it! |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Functions in Excel macro
Srikanth,
x = n Mod k x = WorksheetFunction.Floor(n, k) x = WorksheetFunction.Ceiling(n, k) Regards, Jim Cone San Francisco, CA Srikanth Ganesan" wrote in message ... Hello, I am trying to write an Excel macro. I want to use the following functions that are available in Excel. Please let me know what are the corresponding VB functions/syntax for the macro: Excel Functions: MOD(n,k) Floor(n,k) Ceiling(n,k) Thanks Srikanth |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
String functions in VB macro | Excel Discussion (Misc queries) | |||
macro and/or functions | Excel Worksheet Functions | |||
excel functions and User defined functions | Excel Programming | |||
Convert Excel Functions to VBA Macro Function | Excel Programming | |||
Can Excel macro have functions to check POP3 email! | Excel Programming |