Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default how to use the argument funcation

how to use the argument funcation in the EXcell
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,440
Default how to use the argument funcation

The ARUMENT() function is/was used in Excel4 functions.

Below is text from an old Excel HELP file.

--
Kind regards,

Niek Otten
Microsoft MVP - Excel
================================================== ==========================
Macro Sheets Only
Describes the arguments used in a custom function, which is a type of macro, or in a subroutine. A custom function or subroutine
must contain one ARGUMENT function for each argument in the macro itself. There are two forms of the ARGUMENT function. In the
first form, only name_text is required; in the second form, only reference is required. Use the first form if you want to store
the argument as a name. Use the second form if you want to store the argument in a specific cell or cells.

Syntax 1

For name storage
ARGUMENT(name_text, data_type_num)

Syntax 2

For cell storage
ARGUMENT(name_text, data_type_num, reference)
Name_text is the name of the argument or of the cells containing the argument. Name_text is required if you omit reference.
Data_type_num is a number that determines what type of values Microsoft Excel accepts for the argument. The following table
lists the possible data types.

Data_type_num Type of value

1 Number
2 Text
4 Logical
8 Reference
16 Error
64 Array

Data_type_num can be a sum of the preceding different numbers to allow for more than one possible type of data. For example, if
data_type_num is 7, which is the sum of 1, 2, and 4, then the value can be a number, text, or logical value.
Data_type_num is an optional argument. If you omit data_type_num, it is assumed to be 7.
If the value that is passed to the function macro is not of the type specified by data_type_num, Microsoft Excel first attempts
to convert it to the specified type. If the value cannot be converted, the macro returns the #VALUE! error value.

Reference is the cell or cells in which you want to store the argument's value.

If you specify reference, the value that is passed to ARGUMENT is entered as a constant in the specified cell, and name_text
becomes an optional argument because you can refer to the cell with either reference or name_text.
If you omit reference, name_text is defined on the macro sheet and refers to the value that is passed to ARGUMENT. Once name_text
is defined, you can use it in formulas.

Remarks

Custom functions and subroutines can accept from 1 to 29 arguments.
If a macro contains an ARGUMENT function and you omit the corresponding argument in the function that starts the macro, the macro
uses the #N/A error value as the value of the argument.

Examples

To create a custom function that calculates profit, use the following functions to specify arguments for cost, sales, and sales
volume:

ARGUMENT("UnitsSold", 1)
ARGUMENT("UnitCost", 1)
ARGUMENT("UnitPrice", 1)


Related Function

RESULT Specifies the data type a custom function returns
VOLATILE Makes custom functions recalculate automatically
List of Control Functions
"M. Srinivasa Rao" <M. Srinivasa wrote in message
...
| how to use the argument funcation in the EXcell


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
Conditional Sum Argument results do not equal cell results Excel Randy R Mullins Excel Worksheet Functions 3 August 9th 06 07:16 PM
Need Function Argument pasekm Excel Worksheet Functions 4 March 18th 06 11:14 PM
Passing a UDF as an argument to a UDF puff Excel Discussion (Misc queries) 3 February 23rd 06 09:46 PM
How do I set up an argument which asks for multiple criteria HiTekDiver Excel Discussion (Misc queries) 3 August 29th 05 11:32 PM
read in Vlookup an argument that has quotations(") carlosgdlf Excel Discussion (Misc queries) 1 August 2nd 05 05:56 PM


All times are GMT +1. The time now is 03:56 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"