Microsoft Office Tutorials and References
In Depth Information
Types of arguments
Types of arguments
In the examples presented so far, all the arguments have been cell or range references.
You can also use numbers, text, logical values, range names, arrays, and error values as
Numeric values
The arguments to a function can be numeric. For example, the SUM function in the formula
=SUM(327,209,176) adds the numbers 327, 209, and 176. Usually, however, you type the
numbers you want to use in cells in a worksheet and then use references to those cells as
arguments to your functions.
Text values
You can also use text as an argument to a function. For example, in the formula
=TEXT(NOW( )," mmm d, yyyy "), the second argument to the TEXT function, mmm d, yyyy ,
is a text argument specifically recognized by Excel. It specifies a pattern for converting the
serial date value returned by NOW into a text string. Text arguments can be text strings
enclosed in quotation marks or references to cells that contain text.
For more about text functions, see “Understanding text functions” in Chapter 14, “Everyday
Logical values
The arguments to a few functions specify only that an option is set or not set; you can use
the logical values TRUE to set an option and FALSE to specify that the option isn’t set. A
logical expression returns the value TRUE or FALSE (which evaluates to 1 and 0, respectively)
to the worksheet or the formula containing the expression. For example, the first
argument of the IF function in the formula =IF(A1=TRUE,"Future ", "Past ")&"History" is a logical
expression that uses the value in cell A1. If the value in A1 is TRUE (or 1), the expression
A1=TRUE evaluates to TRUE, the IF function returns Future, and the formula returns the text
Future History to the worksheet.
For more about logical functions, see “Understanding logical functions” in Chapter 14.
Search JabSto ::

Custom Search