Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using functions
I would like to use a home made FUNCTION to divide two numbers
So far In a module I have placed the following code: Function cutit(a%,b%) cutit=a%/b% end function In the spread sheet I call the function: =cutit(12,6) I them get the error message NAMe$ what am I doing wrong |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using functions
On Aug 30, 2:08*pm, pcor wrote:
I would like to use a home made FUNCTION to divide two numbers So far In a module I have placed the following code: Function cutit(a%,b%) cutit=a%/b% end function In the spread sheet I call the function: =cutit(12,6) I them get the error message NAMe$ what am I doing wrong Although you could just use =12/6 I suspect that if you take your function out of the SHEET module and place in a REGULAR module, it will work.... |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Using functions
Your UDF works for me as is when function is in same workbook.
=cutit(12,6) returns 2 Where do you have it stored? A module in the workbook or a module in an external workbook like Personal.xls? =Personal.xls!cutit(12,6) would be OK Gord Dibben MS Excel MVP On Mon, 30 Aug 2010 12:08:39 -0700 (PDT), pcor wrote: I would like to use a home made FUNCTION to divide two numbers So far In a module I have placed the following code: Function cutit(a%,b%) cutit=a%/b% end function In the spread sheet I call the function: =cutit(12,6) I them get the error message NAMe$ what am I doing wrong |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Autocomplete Custom Functions and functions arguments | Excel Programming | |||
User defined functions that are array functions | Excel Programming | |||
How to convert cell formula functions to code functions | Excel Discussion (Misc queries) | |||
efficiency: database functions vs. math functions vs. array formula | Excel Discussion (Misc queries) | |||
Conversion from Spreadsheet Toolkit functions (ESSV....) to EssBase API functions | Excel Programming |