it answers - excel functions
TRANSCRIPT
-
8/2/2019 IT Answers - Excel Functions
1/37
IF function
Show All
This article describes the formula syntax and usage of the IFfunction in Microsoft Excel.
Work with our examples of the IF function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
The IF function returns one value if a condition you specify evaluates to TRUE, and anothervalue if that condition evaluates to FALSE. For example, the formula =IF(A1>10,"Over
10","10 or less") returns "Over 10" if A1 is greater than 10, and "10 or less" if A1 is less
than or equal to 10.
Syntax
IF(logical_test, [value_if_true], [value_if_false])
The IF function syntax has the followingarguments:
logical_test Required. Any value or expression that can be evaluated to TRUE or FALSE.
For example, A10=100 is a logical expression; if the value in cell A10 is equal to 100, the
expression evaluates to TRUE. Otherwise, the expression evaluates to FALSE. This
argument can use anycomparison calculation operator.
value_if_true Optional. The value that you want to be returned if the logical_test argument
evaluates to TRUE. For example, if the value of this argument is the text string "Withinbudget" and the logical_test argument evaluates to TRUE, the IF function returns the text
"Within budget." Iflogical_test evaluates to TRUE and the value_if_true argument is
omitted (that is, there is only a comma following the logical_test argument), the IF
function returns 0 (zero). To display the word TRUE, use the logical value TRUE for the
value_if_true argument.
value_if_false Optional. The value that you want to be returned if the logical_test
argument evaluates to FALSE. For example, if the value of this argument is the text string
http://appendpopup%28this%2C%27353350062_1%27%29/http://appendpopup%28this%2C%27353350062_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342586&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=1ead044f%2D19c9%2D4eed%2D82f1%2D911915c728b1#_Exampleshttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342586&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=1ead044f%2D19c9%2D4eed%2D82f1%2D911915c728b1#_Exampleshttp://appendpopup%28this%2C%27373322285_2%27%29/http://appendpopup%28this%2C%27373322285_2%27%29/http://appendpopup%28this%2C%27373322285_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010078886&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010078886&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010078886&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010078886&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://appendpopup%28this%2C%27373322285_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342586&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=1ead044f%2D19c9%2D4eed%2D82f1%2D911915c728b1#_Exampleshttp://appendpopup%28this%2C%27353350062_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
2/37
"Over budget" and the logical_test argument evaluates to FALSE, the IF function returns
the text "Over budget." Iflogical_test evaluates to FALSE and the value_if_false argument
is omitted, (that is, there is no comma following the value_if_true argument), the IF
function returns the logical value FALSE. Iflogical_test evaluates to FALSE and the value
of the value_if_false argument is omitted (that is, in the IF function, there is no comma
following the value_if_true argument), the IF function returns the value 0 (zero).
Remarks
Up to 64 IF functions can be nested as value_if_true and value_if_false arguments to
construct more elaborate tests. (See Example 3 for a sample of nested IF functions.)
Alternatively, to test many conditions, consider using theLOOKUP,VLOOKUP,
HLOOKUP, orCHOOSEfunctions. (See Example 4 for a sample of the LOOKUP
function.)
If any of the arguments to IF arearrays, every element of the array is evaluated when the
IF statement is carried out.
Excel provides additional functions that can be used to analyse your data based on a
condition. For example, to count the number of occurrences of a string of text or a number
within a range of cells, use theCOUNTIFor theCOUNTIFSworksheet functions. To
calculate a sum based on a string of text or a number within a range, use theSUMIFor the
SUMIFSworksheet functions.
Examples
EXAMPLE 1
This help topic links to live data in an embedded workbook. Change data, or modify or create
formulas in the worksheet and they will immediately be calculated by Excel Web App a
version of Excel that runs on the web.
The formulas in these examples use the IF function to test the contents of a cell against values
to determine a value to return in another cell.
Work with this example of the IF function in an embedded workbook
http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069832&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069832&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069832&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069835&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069835&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069835&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062411&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062411&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069830&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069830&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069830&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://appendpopup%28this%2C%27302005435_3%27%29/http://appendpopup%28this%2C%27302005435_3%27%29/http://appendpopup%28this%2C%27302005435_3%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069840&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069840&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069840&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047494&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047494&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047494&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062465&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062465&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062465&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047504&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047504&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047504&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062465&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HA010047494&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069840&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://appendpopup%28this%2C%27302005435_3%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069830&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010062411&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069835&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010069832&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010342586 -
8/2/2019 IT Answers - Excel Functions
3/37
With a cell selected in the Live result column of the embedded workbook, you can press F2
to see its underlying formula. You can change the formula in the cell or you can copy or edit
and then paste the formula to another cell and experiment with it there.
You can download the workbook by clicking the View full-size workbook button in the
lower-right corner of the embedded workbook (at the right end of the black bar, above).
Clicking the button loads the workbook in a new browser window (or tab, depending on your
browser settings). Note that you can't type in the worksheet cells in the full-size browserview.
In full-size browser view, you can then click the Download button , which enables
you to open the entire workbook in Excel or save it to your computer. For some function
examples, opening the workbook in the Excel desktop program allows you to work with array
formulas, in which you must press the CTRL+SHIFT+Enter key combination (this
combination does not work in the browser).
EXAMPLE 2
The formulas in these examples use the IF function to test the contents of a cell to determine
if an expense is over budget.
Work with this example of the IF function in an embedded workbook
EXAMPLE 3
The formulas in these examples demonstrate how you can nest IF statements. In each
formula, the fourth IF statement is also the value_if_false argument to the third IF statement.
Similarly, the third IF statement is the value_if_false argument to the second IF statement,
and the second IF statement is the value_if_false argument to the first IF statement. For
example, if the first logical_test argument (Average>89) evaluates to TRUE, "A" is returned.
If the first logical_test argument evaluates to FALSE, the second IF statement is evaluated,
and so on. You can also use other functions as arguments.
Work with this example of the IF function in an embedded workbook
The letter grades are assigned to numbers, using the following key.
http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223278&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223280&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223280&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223281&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223281&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223281&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223280&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
4/37
-
8/2/2019 IT Answers - Excel Functions
5/37
SUMPRODUCT function
Show All
This article describes the formula syntax and usage of the SUMPRODUCTfunctionin Microsoft Excel.
Work with our examples of the SUMPRODUCT function in an embedded workbook, in which you
can watch the answers appear in real time!
Description
Multiplies corresponding components in the given arrays, and returns the sum of those products.
Syntax
SUMPRODUCT(array1, [array2], [array3], ...)
The SUMPRODUCT function syntax has the followingarguments:
Array1 Required. The first array argument whose components you want to multiply and then add.
Array2, array3,... Optional. Array arguments 2 to 255 whose components you want to multiply and then add.
Remarks
The array arguments must have the same dimensions. If they do not, SUMPRODUCT returns the #VALUE!
error value.
SUMPRODUCT treats array entries that are not numeric as if they were zeros.
Example
This help topic links to live data in an embedded workbook. Change data, or modify or create formulas in the
worksheet and they will immediately be calculated by Excel Web App a version of Excel that runs on the web.
Work with this example of the SUMPRODUCT function in an embedded workbook
The preceding example returns the same result as the formula SUM(A2:B4*C2:D4) entered as an array in the
Excel desktop application. Using arrays provides a more general solution for doing operations similar to
http://appendpopup%28this%2C%27387464133_1%27%29/http://appendpopup%28this%2C%27387464133_1%27%29/http://appendpopup%28this%2C%27387464133_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342935&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=6ead9399%2De9fa%2D419a%2Da231%2D1b57a9e089c9#_Examplehttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342935&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=6ead9399%2De9fa%2D419a%2Da231%2D1b57a9e089c9#_Examplehttp://appendpopup%28this%2C%27756110207_2%27%29/http://appendpopup%28this%2C%27756110207_2%27%29/http://appendpopup%28this%2C%27756110207_2%27%29/http://go.microsoft.com/fwlink/?LinkID=223450&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223450&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223450&clcid=0x409&app=ZXL&ver=14http://appendpopup%28this%2C%27756110207_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342935&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=6ead9399%2De9fa%2D419a%2Da231%2D1b57a9e089c9#_Examplehttp://appendpopup%28this%2C%27387464133_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
6/37
SUMPRODUCT. For example, you can calculate the sum of the squares of the elements in A2:B4 by using the
formula =SUM(A2:B4^2) and pressing CTRL+SHIFT+ENTER
With a cell selected in the Live result column of the embedded work book, you can press F2 to see its underlying
formula. You can change the formula in the cell or you can copy or edit and then paste the formula to another cell
and experiment with it there.
You can download the workbook by clicking the View full-size workbook button in the lower-right corner of the
embedded workbook (at the right end of the black bar, above). Clicking the button loads the workbook in a new
browser window (or tab, depending on your browser settings). Note that you can't type in the worksheet cells in
the full-size browser view.
In full-size browser view, you can then click the Download button , which enables you to open the
entire workbook in Excel or save it to your computer. For some function examples, opening the workbook in the
Excel desktop program allows you to work with array formulas, in which you must press the CTRL+SHIFT+Enter
key combination (this combination does not work in the browser).
-
8/2/2019 IT Answers - Excel Functions
7/37
ROUND function
Show All
This article describes the formula syntax and usage of the ROUNDfunctionin Microsoft Excel.
Work with our examples of the ROUND function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
The ROUND function rounds a number to a specified number of digits. For example, if cell A1 contains 23.7825,and you want to round that value to two decimal places, you can use the following formula:
=ROUND(A1, 2)
The result of this function is 23.78.
Syntax
ROUND(number, num_digits)
The ROUND function syntax has the followingarguments:
number Required. The number that you want to round.
num_digits Required. The number of digits to which you want to round the number argument.
Remarks
If num_digitsis greater than 0 (zero), then number is rounded to the specified number of decimal places.
If num_digitsis 0, the number is rounded to the nearest integer.
If num_digitsis less than 0, the number is rounded to the left of the decimal point.
To always round up (away from zero), use the ROUNDUP function.
To always round down (toward zero), use the ROUNDDOWN function.
To round a number to a specific multiple (for example, to round to the nearest 0.5), use the MROUND
function.
http://appendpopup%28this%2C%27584431502_1%27%29/http://appendpopup%28this%2C%27584431502_1%27%29/http://appendpopup%28this%2C%27584431502_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342858&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=ad02d61d%2D239d%2D4846%2D95ce%2D3d2b5102971c#_Examplehttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342858&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=ad02d61d%2D239d%2D4846%2D95ce%2D3d2b5102971c#_Examplehttp://appendpopup%28this%2C%27637235010_2%27%29/http://appendpopup%28this%2C%27637235010_2%27%29/http://appendpopup%28this%2C%27637235010_2%27%29/http://appendpopup%28this%2C%27637235010_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342858&lcid=16393&NS=EXCEL&Version=14&tl=2&respos=0&CTT=1&queryid=ad02d61d%2D239d%2D4846%2D95ce%2D3d2b5102971c#_Examplehttp://appendpopup%28this%2C%27584431502_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
8/37
-
8/2/2019 IT Answers - Excel Functions
9/37
RANDBETWEEN function
Show All
This article describes the formula syntax and usage of the RANDBETWEENfunctionin Microsoft Excel.
Description
Returns a random integer number between the numbers you specify. A new random integer number is returned
every time the worksheet is calculated.
Syntax
RANDBETWEEN(bottom, top)
The RANDBETWEEN function syntax has the followingarguments:
Bottom Required. The smallest integer RANDBETWEEN will return.
Top Required. The largest integer RANDBETWEEN will return.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
1. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one
cell at a time. Important: Do not select the row or column headers.
1. Press CTRL+C.
2. Create a blank workbook or worksheet.
3. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copyingand pasting for each cell in the example.
1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
A B
Formula Description (Result)
=RANDBETWEEN(1,100) Random number between 1 and 100 (varies)
=RANDBETWEEN(-1,1) Random number between -1 and 1 (varies)
http://appendpopup%28this%2C%27522445883_1%27%29/http://appendpopup%28this%2C%27522445883_1%27%29/http://appendpopup%28this%2C%27522445883_1%27%29/http://appendpopup%28this%2C%2722643032_2%27%29/http://appendpopup%28this%2C%2722643032_2%27%29/http://appendpopup%28this%2C%2722643032_2%27%29/http://togglediv%28%27divexpcollasst_277840343%27%29/http://togglediv%28%27divexpcollasst_277840343%27%29/http://togglediv%28%27divexpcollasst_277840343%27%29/http://togglediv%28%27divexpcollasst_277840343%27%29/http://appendpopup%28this%2C%2722643032_2%27%29/http://appendpopup%28this%2C%27522445883_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
10/37
SUM function
Show All
This article describes the formula syntax and usage of the SUMfunctionin Microsoft Excel.
Work with our examples of the SUM function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
The SUM function adds all the numbers that you specify asarguments. Each argument can be arange, acellreference, anarray, aconstant, aformula, or the result from another function. For example, SUM(A1:A5) adds all
the numbers that are contained in cells A1 through A5. For another example, SUM(A1, A3, A5) adds the
numbers that are contained in cells A1, A3, and A5.
Syntax
SUM(number1,[number2],...])
The SUM function syntax has the followingarguments:
number1 Required. The first number argument that you want to add.
number2,,... Optional. Number arguments 2 to 255 that you want to add.
Remarks
If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells,
logical values, or text in the array or reference are ignored.
If any arguments are error values, or if any arguments are text that cannot be translated into numbers, Excel
displays an error.
Example
This help topic links to live data in an embedded workbook. Change data, or modify or create formulas in the
worksheet and they will immediately be calculated by Excel Web App a version of Excel that runs on the web.
These examples show common formulas using the SUM function.
http://appendpopup%28this%2C%27554351168_1%27%29/http://appendpopup%28this%2C%27554351168_1%27%29/http://appendpopup%28this%2C%27554351168_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342931&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342931&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://appendpopup%28this%2C%27475362315_2%27%29/http://appendpopup%28this%2C%27475362315_2%27%29/http://appendpopup%28this%2C%27475362315_2%27%29/http://appendpopup%28this%2C%27560647487_3%27%29/http://appendpopup%28this%2C%27560647487_3%27%29/http://appendpopup%28this%2C%27560647487_3%27%29/http://appendpopup%28this%2C%27431302263_4%27%29/http://appendpopup%28this%2C%27431302263_4%27%29/http://appendpopup%28this%2C%27431302263_4%27%29/http://appendpopup%28this%2C%27431302263_4%27%29/http://appendpopup%28this%2C%2765830172_5%27%29/http://appendpopup%28this%2C%2765830172_5%27%29/http://appendpopup%28this%2C%2765830172_5%27%29/http://appendpopup%28this%2C%27567468725_6%27%29/http://appendpopup%28this%2C%27567468725_6%27%29/http://appendpopup%28this%2C%27567468725_6%27%29/http://appendpopup%28this%2C%27270676253_7%27%29/http://appendpopup%28this%2C%27270676253_7%27%29/http://appendpopup%28this%2C%27270676253_7%27%29/http://appendpopup%28this%2C%2753845472_8%27%29/http://appendpopup%28this%2C%2753845472_8%27%29/http://appendpopup%28this%2C%2753845472_8%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342931&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342931&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655http://appendpopup%28this%2C%2753845472_8%27%29/http://appendpopup%28this%2C%27270676253_7%27%29/http://appendpopup%28this%2C%27567468725_6%27%29/http://appendpopup%28this%2C%2765830172_5%27%29/http://appendpopup%28this%2C%27431302263_4%27%29/http://appendpopup%28this%2C%27431302263_4%27%29/http://appendpopup%28this%2C%27560647487_3%27%29/http://appendpopup%28this%2C%27475362315_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342931&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://appendpopup%28this%2C%27554351168_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
11/37
-
8/2/2019 IT Answers - Excel Functions
12/37
PMT function
Show All
This article describes the formula syntax and usage of the PMTfunctionin Microsoft Excel.
Work with our examples of the PMT function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
Calculates the payment for a loan based on constant payments and a constant interest rate.
Syntax
PMT(rate, nper, pv, [fv], [type])
NOTE For a more complete description of the arguments in PMT, see the PV function.
The PMT function syntax has the followingarguments:
Rate Required. The interest rate for the loan.
Nper Required. The total number of payments for the loan.
Pv Required. The present value, or the total amount that a series of future payments is worth now; also known
as the principal.
Fv Optional. The future value, or a cash balance you want to attain after the last payment is made. If fv is
omitted, it is assumed to be 0 (zero), that is, the future value of a loan is 0.
Type Optional. The number 0 (zero) or 1 and indicates when payments are due.
SET TYPE EQUAL TO IF PAYMENTS ARE DUE
0 or omitted At the end of the period
1 At the beginning of the period
Remarks
The payment returned by PMT includes principal and interest but no taxes, reserve payments, or fees
sometimes associated with loans.
http://appendpopup%28this%2C%27413173364_1%27%29/http://appendpopup%28this%2C%27413173364_1%27%29/http://appendpopup%28this%2C%27413173364_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342769&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Exampleshttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342769&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Exampleshttp://appendpopup%28this%2C%27477024351_2%27%29/http://appendpopup%28this%2C%27477024351_2%27%29/http://appendpopup%28this%2C%27477024351_2%27%29/http://appendpopup%28this%2C%27477024351_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342769&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Exampleshttp://appendpopup%28this%2C%27413173364_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
13/37
Make sure that you are consistent about the units you use for specifying rate and nper. If you make monthly
payments on a four-year loan at an annual interest rate of 12 percent, use 12%/12 for rate and 4*12 for nper. If
you make annual payments on the same loan, use 12 percent for rate and 4 for nper.
Tip To find the total amount paid over the duration of the loan, multiply the returned PMT value by nper.
Examples
EXAMPLE 1
This help topic links to live data in an embedded workbook. Change data, or modify or create formulas in the
worksheet and they will immediately be calculated by Excel Web App a version of Excel that runs on the web.
This example uses the PMT function to determine the monthly payment for a loan.
Work with this example of the PMT function in an embedded workbook
With a cell selected in the Live result column of the embedded workbook, you can press F2 to see its underlying
formula. You can change the formula in the cell or you can copy or edit and then paste the formula to another cell
and experiment with it there.
You can download the workbook by clicking the View full-size workbook button in the lower-right corner of the
embedded workbook (at the right end of the black bar, above). Clicking the button loads the workbook in a new
browser window (or tab, depending on your browser settings). Note that you can't type in the worksheet cells in
the full-size browser view.
In full-size browser view, you can then click the Download button , which enables you to open the
entire workbook in Excel or save it to your computer. For some function examples, opening the workbook in the
Excel desktop program allows you to work with array formulas, in which you must press the CTRL+SHIFT+Enter
key combination (this combination does not work in the browser).
EXAMPLE 2
This example uses the PMT function to determine the amount to save each month to have $50,000 at the end of18 years.
http://go.microsoft.com/fwlink/?LinkID=223402&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223402&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223402&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
14/37
Work with this example of the PMT function in an embedded workbook
NOTE The interest rate is divided by 12 to get a monthly rate. The number of years the money is paid out is
multiplied by 12 to get the number of payments.
http://go.microsoft.com/fwlink/?LinkID=223403&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223403&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223403&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
15/37
MINVERSE function
Show All
This article describes the formula syntax and usage of the MINVERSEfunctionin Microsoft Excel.
Description
Returns the inverse matrix for the matrix stored in an array.
Syntax
MINVERSE(array)
The MINVERSE function syntax has the followingarguments:
Array Required. A numeric array with an equal number of rows and columns.
Remarks
Array can be given as a cell range, such as A1:C3; as an array constant, such as {1,2,3;4,5,6;7,8,9}; or as a
name for either of these.
If any cells in array are empty or contain text, MINVERSE returns the #VALUE! error value.
MINVERSE also returns the #VALUE! error value if array does not have an equal number of rows and
columns.
Formulas that return arrays must be entered as array formulas.
Inverse matrices, like determinants, are generally used for solving systems of mathematical equations
involving several variables. The product of a matrix and its inverse is the identity matrix the square array in
which the diagonal values equal 1, and all other values equal 0.
As an example of how a two-row, two-column matrix is calculated, suppose that the range A1:B2 contains the
letters a, b, c, and d that represent any four numbers. The following table shows the inverse of the matrix
A1:B2.
COLUMN A COLUMN B
Row 1 d/(a*d-b*c) b/(b*c-a*d)
Row 2 c/(b*c-a*d) a/(a*d-b*c)
http://appendpopup%28this%2C%27558051581_1%27%29/http://appendpopup%28this%2C%27558051581_1%27%29/http://appendpopup%28this%2C%27558051581_1%27%29/http://appendpopup%28this%2C%2755462302_2%27%29/http://appendpopup%28this%2C%2755462302_2%27%29/http://appendpopup%28this%2C%2755462302_2%27%29/http://appendpopup%28this%2C%2755462302_2%27%29/http://appendpopup%28this%2C%27558051581_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
16/37
MINVERSE is calculated with an accuracy of approximately 16 digits, which may lead to a small numeric error
when the cancellation is not complete.
Some square matrices cannot be inverted and will return the #NUM! error value with MINVERSE. The
determinant for a noninvertable matrix is 0.
Example
EXAMPLE 1
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
1. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at
a time.Important Do not select the row or column headers.
2. Press CTRL+C.
3. Create a blank workbook or worksheet.
4. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and
pasting for each cell in the example.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave
accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
A B
Data Data
4 -1
2 0
Formula Formula
=MINVERSE(A2:B3)
NOTES
The formula in the example must be entered as an array formula in the Excel desktop application. After
copying the example to a blank worksheet, select the range A5:B6 starting with the formula cell. Press F2, and
then press CTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the single result is 0.
In Excel Web App, to view the result in its proper format, select the cell, and then on the Home tab, in the
Number group, click the arrow next to Number Format, and click General.
http://togglediv%28%27divexpcollasst_121082046%27%29/http://togglediv%28%27divexpcollasst_121082046%27%29/http://togglediv%28%27divexpcollasst_121082046%27%29/ -
8/2/2019 IT Answers - Excel Functions
17/37
EXAMPLE 2
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
6. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at
a time.Important Do not select the row or column headers.
7. Press CTRL+C.
8. Create a blank workbook or worksheet.
9. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and
pasting for each cell in the example.
10. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave
accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
6
A B C
Data Data Data
1 2 1
3 4 -1
0 2 0
Formula Formula Formula
=MINVERSE(A2:C4)
NOTES
The formula in the example must be entered as an array formula n the Excel desktop application. After
copying the example to a blank worksheet, select the range A6:C8 starting with the formula cell. Press F2, and
then press CTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the single result is 0.25.
In Excel Web App, to view the result in its proper format, select the cell, and then on the Home tab, in the
Number group, click the arrow next to Number Format, and click General
http://togglediv%28%27divexpcollasst_186204881%27%29/http://togglediv%28%27divexpcollasst_186204881%27%29/http://togglediv%28%27divexpcollasst_186204881%27%29/ -
8/2/2019 IT Answers - Excel Functions
18/37
MMULT function
This article describes the formula syntax and usage of the MMULTfunctionin Microsoft Excel.
Description
Returns the matrix product of two arrays. The result is an array with the same number of rows as array1 and the
same number of columns as array2.
Syntax
MMULT(array1, array2)
The MMULT function syntax has the followingarguments:
Array1, array2 Required. The arrays you want to multiply.
Remarks
The number of columns in array1 must be the same as the number of rows in array2, and both arrays must
contain only numbers.
Array1 and array2 can be given as cell ranges, array constants, or references.
MMULT returns the #VALUE! error when:
Any cells are empty or contain text.
The number of columns in array1 is different from the number of rows in array2.
Formulas that return arrays must be entered as array formulas.
NOTE In Excel Web App you cannot create array formulas.
Example
EXAMPLE 1
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
http://appendpopup%28this%2C%27172366433_1%27%29/http://appendpopup%28this%2C%27172366433_1%27%29/http://appendpopup%28this%2C%27172366433_1%27%29/http://appendpopup%28this%2C%27771002661_2%27%29/http://appendpopup%28this%2C%27771002661_2%27%29/http://appendpopup%28this%2C%27771002661_2%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://appendpopup%28this%2C%27771002661_2%27%29/http://appendpopup%28this%2C%27172366433_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
19/37
1. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at
a time.Important Do not select the row or column headers.
2. Press CTRL+C.
3. Create a blank workbook or worksheet.
4. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and
pasting for each cell in the example.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave
accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
6
7
8
A B
Array 1 Array 1
1 3
7 2
Array 2 Array 2
2 0
0 2
Formula Formula
=MMULT(A2:B3,A5:B6)
NOTE The formula in the example must be entered as an array formula. After copying the example to a
blank worksheet, select the range A8:B9 starting with the formula cell. Press F2, and then press
CTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the single result is 2.
EXAMPLE 2
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
1. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at
a time.Important Do not select the row or column headers.
2. Press CTRL+C.
3. Create a blank workbook or worksheet.
4. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and
pasting for each cell in the example.
5. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (graveaccent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_123199544%27%29/http://togglediv%28%27divexpcollasst_-966886813%27%29/http://togglediv%28%27divexpcollasst_-966886813%27%29/http://togglediv%28%27divexpcollasst_-966886813%27%29/ -
8/2/2019 IT Answers - Excel Functions
20/37
1
2
3
4
5
6
7
8
A B
Array 1 Array 1
3 0
2 0
Array 2 Array 2
2 0
0 2
Formula Formula
=MMULT(A2:B3,A5:B6)
NOTE The formula in the example must be entered as an array formula in the Excel desktop application. After
copying the example to a blank worksheet, select the range A8:B9 starting with the formula cell. Press F2, and
then press CTRL+SHIFT+ENTER. If the formula is not entered as an array formula, the single result is 6.
-
8/2/2019 IT Answers - Excel Functions
21/37
WEEKDAY function
Show All
This article describes the formula syntax and usage of the WEEKDAYfunctionin Microsoft Excel.
Description
Returns the day of the week corresponding to a date. The day is given as an integer, ranging from 1 (Sunday) to
7 (Saturday), by default.
Syntax
WEEKDAY(serial_number,[return_type])
The WEEKDAY function syntax has the followingarguments:
Serial_number Required. A sequential number that represents the date of the day you are trying to f ind.
Dates should be entered by using the DATE function, or as results of other formulas or functions. For
example, use DATE(2008,5,23) for the 23rd day of May, 2008. Problems can occur if dates are entered as
text.
Return_type Optional. A number that determines the type of return value.
RETURN_TYPE NUMBER RETURNED
1 or omitted Numbers 1 (Sunday) through 7 (Saturday). Behaves like previous versions of Microsoft Excel.
2 Numbers 1 (Monday) through 7 (Sunday).
3 Numbers 0 (Monday) through 6 (Sunday).
11 Numbers 1 (Monday) through 7 (Sunday).
12 Numbers 1 (Tuesday) through 7 (Monday).
13 Numbers 1 (Wednesday) through 7 (Tuesday).
14 Numbers 1 (Thursday) through 7 (Wednesday).
15 Numbers 1 (Friday) through 7 (Thursday).
16 Numbers 1 (Saturday) through 7 (Friday).
17 Numbers 1 (Sunday) through 7 (Saturday).
Remark
Microsoft Excel stores dates as sequential serial numbers so they can be used in calculations. By default,
January 1, 1900 is serial number 1, and January 1, 2008 is serial number 39448 because it is 39,448 days
after January 1, 1900.
If serial_number is out of range for the current date base value, a #NUM! error is returned.
http://appendpopup%28this%2C%27365437745_1%27%29/http://appendpopup%28this%2C%27365437745_1%27%29/http://appendpopup%28this%2C%27365437745_1%27%29/http://appendpopup%28this%2C%2717046187_2%27%29/http://appendpopup%28this%2C%2717046187_2%27%29/http://appendpopup%28this%2C%2717046187_2%27%29/http://appendpopup%28this%2C%2717046187_2%27%29/http://appendpopup%28this%2C%27365437745_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
22/37
If return_type is out of the range specified in the table above, a #NUM! error is returned.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
1. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one
cell at a time.Important Do not select the row or column headers.
1. Press CTRL+C.
2. Create a blank workbook or worksheet.
3. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copyingand pasting for each cell in the example.
1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
6
A B
Data
2/14/2008
Formula Description (Result)
=WEEKDAY(A2) Day of the week, with numbers 1 (Sunday) through 7 (Saturday) (5)
=WEEKDAY(A2, 2) Day of the week, with numbers 1 (Monday) through 7 (Sunday) (4)
=WEEKDAY(A2, 3) Day of the week, with numbers 0 (Monday) through 6 (Sunday) (3)
NOTES
2/14/2008 is a Thursday.
In Excel Web App, to view the result in its proper format, select the cell, and then on the Home tab, in the
Number group, click the arrow next to Number Format, and click General.
http://togglediv%28%27divexpcollasst_521834030%27%29/http://togglediv%28%27divexpcollasst_521834030%27%29/http://togglediv%28%27divexpcollasst_521834030%27%29/ -
8/2/2019 IT Answers - Excel Functions
23/37
VLOOKUP function
This article describes the formula syntax and usage of the VLOOKUPfunctionin Microsoft Excel.
Work with our examples of the VLOOKUP function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
You can use the VLOOKUP function to search the first column of arangeof cells, and then return a value from
any cell on the same row of the range. For example, suppose that you have a list of employees contained in the
range A2:C10. The employees' ID numbers are stored in the first column of the range, as shown in the following
illustration.
If you know the employee's ID number, you can use the VLOOKUP function to return either the department or
the name of that employee. To obtain the name of employee number 38, you can use the formula
=VLOOKUP(38, A2:C10, 3, FALSE). This formula searches for the value 38 in the first column of the range
A2:C10, and then returns the value that is contained in the third column of the range and on the same row as the
lookup value ("Axel Delgado").
The V in VLOOKUP stands for vertical. Use VLOOKUP instead of HLOOKUP when your comparison values are
located in a column to the left of the data that you want to find.
Syntax
VLOOKUP(lookup_value, table_array, col_index_num, [range_lookup])
The VLOOKUP function syntax has the followingarguments:
http://appendpopup%28this%2C%27308154564_1%27%29/http://appendpopup%28this%2C%27308154564_1%27%29/http://appendpopup%28this%2C%27308154564_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010343011&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010343011&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://appendpopup%28this%2C%27476465516_2%27%29/http://appendpopup%28this%2C%27476465516_2%27%29/http://appendpopup%28this%2C%27476465516_2%27%29/http://appendpopup%28this%2C%27464037257_3%27%29/http://appendpopup%28this%2C%27464037257_3%27%29/http://appendpopup%28this%2C%27464037257_3%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010343011&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010343011&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655http://appendpopup%28this%2C%27464037257_3%27%29/http://appendpopup%28this%2C%27476465516_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010343011&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://appendpopup%28this%2C%27308154564_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
24/37
lookup_value Required. The value to search in the first column of the table or range. The lookup_value
argument can be a value or a reference. If the value you supply for the lookup_valueargument is smaller
than the smallest value in the first column of the table_arrayargument, VLOOKUP returns the #N/A error
value.
table_array Required. The range of cells that contains the data. You can use a reference to a range (for
example, A2:D8), or a range name. The values in the first column of table_arrayare the values searched by
lookup_value. These values can be text, numbers, or logical values. Uppercase and lowercase text is
equivalent.
col_index_num Required. The column number in the table_arrayargument from which the matching value
must be returned. A col_index_numargument of 1 returns the value in the first column in table_array; a
col_index_numof 2 returns the value in the second column in table_array, and so on.
If the col_index_numargument is:
Less than 1, VLOOKUP returns the #VALUE! error value.
Greater than the number of columns in table_array, VLOOKUP returns the #REF! error value.
range_lookup Optional. A logical value that specifies whether you want VLOOKUP to find an exact match or
an approximate match:
If range_lookupis either TRUE or is omitted, an exact or approximate match is returned. If an exact match is
not found, the next largest value that is less than lookup_valueis returned.
IMPORTANT If range_lookupis either TRUE or is omitted, the values in the first column of
table_arraymust be placed in ascending sort order; otherwise, VLOOKUP might not return the
correct value.
For more information, seeSort data in a range or table.
If range_lookupis FALSE, the values in the first column of table_arraydo not need to be
sorted.
If the range_lookupargument is FALSE, VLOOKUP will find only an exact match. If there are two or
more values in the first column of table_arraythat match the lookup_value, the first value found is
used. If an exact match is not found, the error value #N/A is returned.
Remarks
http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342909&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342909&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342909&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342909&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011 -
8/2/2019 IT Answers - Excel Functions
25/37
When searching text values in the first column of table_array, ensure that the data in the first column of
table_arraydoes not contain leading spaces, trailing spaces, inconsistent use of straight ( ' or " ) and curly (
or ) quotation marks, or nonprinting characters. In these cases, VLOOKUP might return an incorrect or
unexpected value.
For more information, seeCLEAN functionandTRIM function.
When searching number or date values, ensure that the data in the first column of table_arrayis not stored as
text values. In this case, VLOOKUP might return an incorrect or unexpected value.
If range_lookup is FALSE and lookup_value is text, you can use the wildcard characters the question mark
(?) and asterisk (*) in lookup_value. A question mark matches any single character; an asterisk matches
any sequence of characters. If you want to find an actual question mark or asterisk, type a tilde (~) preceding
the character.
Example
EXAMPLE 1
This help topic links to live data in an embedded workbook. Change data, or modify or create formulas in the
worksheet and they will immediately be calculated by Excel Web App a version of Excel that runs on the web.
This example searches the Density column of an atmospheric properties table to find corresponding values in the
Viscosity and Temperature columns. (The values are for air at 0 degrees Celsius at sea level, or 1 atmosphere.)
Work with this example of the VLOOKUP function in an embedded workbook
NOTE In Excel Web App, to view the result in its proper format, select the cell, and then on the Home tab, in the
Number group, click the arrow next to Number Format, and click General.
With a cell selected in the Live result column of the embedded workbook, you can press F2 to see its underlying
formula. You can change the formula in the cell or you can copy or edit and then paste the formula to another cell
and experiment with it there.
http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342270&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342270&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342270&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342967&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342967&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342967&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://go.microsoft.com/fwlink/?LinkID=223273&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223273&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223273&clcid=0x409&app=ZXL&ver=14http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342967&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342270&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010343011 -
8/2/2019 IT Answers - Excel Functions
26/37
You can download the workbook by clicking the View full-size workbook button in the lower-right corner of the
embedded workbook (at the right end of the black bar, above). Clicking the button loads the workbook in a new
browser window (or tab, depending on your browser settings). Note that you can't type in the worksheet cells in
the full-size browser view.
In full-size browser view, you can then click the Download button , which enables you to open the
entire workbook in Excel or save it to your computer. For some function examples, opening the workbook in the
Excel desktop program allows you to work with array formulas, in which you must press the CTRL+SHIFT+Enter
key combination (this combination does not work in the browser).
EXAMPLE 2
This example searches the Item-ID column of a baby products table and matches values in the Cost and Markup
columns to calculate prices and test conditions.
Work with this example of the VLOOKUP function in an embedded workbook
NOTE In Excel Web App, to view the result in its proper format, select the cell, and then on the Home tab, in the
Number group, click the arrow next to Number Format, and click General.
EXAMPLE 3
This example searches the ID column of an employee table and matches values in other columns to calculate
ages and test for error conditions.
Work with this example of the VLOOKUP function in an embedded workbook
http://go.microsoft.com/fwlink/?LinkID=223274&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223274&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223277&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223277&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223277&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223274&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
27/37
CHOOSE function
Show All
This article describes the formula syntax and usage of the CHOOSEfunctionin Microsoft Excel.
Work with our examples of the CHOOSE function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
Uses index_num to return a value from the list of value arguments. Use CHOOSE to select one of up to 254values based on the index number. For example, if value1 through value7 are the days of the week, CHOOSE
returns one of the days when a number between 1 and 7 is used as index_num.
Syntax
CHOOSE(index_num, value1, [value2], ...)
The CHOOSE function syntax has the followingarguments:
Index_num Required. Specifies which value argument is selected. Index_num must be a number between 1
and 254, or a formula or reference to a cell containing a number between 1 and 254.
If index_num is 1, CHOOSE returns value1; if it is 2, CHOOSE returns value2; and so on.
If index_num is less than 1 or greater than the number of the last value in the list, CHOOSE returns the
#VALUE! error value.
If index_num is a fraction, it is truncated to the lowest integer before being used.
Value1, value2, ... Value 1 is required, subsequent values are optional. 1 to 254 value arguments from which
CHOOSE selects a value or an action to perform based on index_num. The arguments can be numbers, cell
references, defined names, formulas, functions, or text.
Remarks
If index_num is anarray, every value is evaluated when CHOOSE is evaluated.
The value arguments to CHOOSE can be range references as well as single values.
http://appendpopup%28this%2C%27765075567_1%27%29/http://appendpopup%28this%2C%27765075567_1%27%29/http://appendpopup%28this%2C%27765075567_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342269&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Exampleshttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342269&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Exampleshttp://appendpopup%28this%2C%27785276117_2%27%29/http://appendpopup%28this%2C%27785276117_2%27%29/http://appendpopup%28this%2C%27785276117_2%27%29/http://appendpopup%28this%2C%27276863471_3%27%29/http://appendpopup%28this%2C%27276863471_3%27%29/http://appendpopup%28this%2C%27276863471_3%27%29/http://appendpopup%28this%2C%27276863471_3%27%29/http://appendpopup%28this%2C%27785276117_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342269&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Exampleshttp://appendpopup%28this%2C%27765075567_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
28/37
For example, the formula:
=SUM(CHOOSE(2,A1:A10,B1:B10,C1:C10))
evaluates to:
=SUM(B1:B10)
which then returns a value based on the values in the range B1:B10.
The CHOOSE function is evaluated first, returning the reference B1:B10. The SUM function is then
evaluated using B1:B10, the result of the CHOOSE function, as its argument.
Examples
EXAMPLE 1
This help topic links to live data in an embedded workbook. Change data, or modify or create formulas in the
worksheet and they will immediately be calculated by Excel Web App a version of Excel that runs on the web.
This example uses the CHOOSE function to return the values of specific arguments.
Work with this example of the CHOOSE function in an embedded workbook
With a cell selected in the Live result column of the embedded workbook, you can press F2 to see its underlying
formula. You can change the formula in the cell or you can copy or edit and then paste the formula to another cell
and experiment with it there.
You can download the workbook by clicking the View full-size workbook button in the lower-right corner of the
embedded workbook (at the right end of the black bar, above). Clicking the button loads the workbook in a new
browser window (or tab, depending on your browser settings). Note that you can't type in the worksheet cells in
the full-size browser view.
In full-size browser view, you can then click the Download button , which enables you to open the
entire workbook in Excel or save it to your computer. For some function examples, opening the workbook in the
http://go.microsoft.com/fwlink/?LinkID=223451&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223451&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223451&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
29/37
Excel desktop program allows you to work with array formulas, in which you must press the CTRL+SHIFT+Enter
key combination (this combination does not work in the browser).
EXAMPLE 2
This example uses the CHOOSE function to sum a specific range.
Work with this example of the CHOOSE function in an embedded workbook
http://go.microsoft.com/fwlink/?LinkID=223453&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223453&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223453&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
30/37
COUNT function
Show All
This article describes the formula syntax and usage of the COUNTfunctionin Microsoft Excel.
Work with our examples of the COUNT function in an embedded workbook, in which you can
watch the answers appear in real time!
Description
The COUNT function counts the number of cells that contain numbers, and counts numbers within the list ofarguments. Use the COUNT function to get the number of entries in a number field that is in a range or array of
numbers. For example, you can enter the following formula to count the numbers in the range A1:A20:
=COUNT(A1:A20)
In this example, if five of the cells in the range contain numbers, the result is 5.
Syntax
COUNT(value1, [value2], ...)
The COUNT function syntax has the followingarguments:
value1 Required. The first item, cell reference, or range within which you want to count numbers.
value2, ... Optional. Up to 255 additional items, cell references, or ranges within which you want to count
numbers.
NOTE The arguments can contain or refer to a variety of different types of data, but only numbers are counted.
Remarks
Arguments that are numbers, dates, or a text representation of numbers (for example, a number enclosed in
quotation marks, such as "1") are counted.
Logical values and text representations of numbers that you type directly into the list of arguments are
counted.
Arguments that are error values or text that cannot be translated into numbers are not counted.
http://appendpopup%28this%2C%27645273441_1%27%29/http://appendpopup%28this%2C%27645273441_1%27%29/http://appendpopup%28this%2C%27645273441_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342338&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342338&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://appendpopup%28this%2C%27820868425_2%27%29/http://appendpopup%28this%2C%27820868425_2%27%29/http://appendpopup%28this%2C%27820868425_2%27%29/http://appendpopup%28this%2C%27820868425_2%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010342338&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HA010342655#_Examplehttp://appendpopup%28this%2C%27645273441_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
31/37
If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells,
logical values, text, or error values in the array or reference are not counted.
If you want to count logical values, text, or error values, use the COUNTA function.
If you want to count only numbers that meet certain criteria, use the COUNTIF function or the COUNTIFS
function.
Example
This help topic links to live data in an embedded workbook. Change data, or modify or create formulas in the
worksheet and they will immediately be calculated by Excel Web App a version of Excel that runs on the web.
In these examples, the COUNT function counts the number of cells that contain numbers and numbers in the list
of arguments.
Work with these examples of the COUNT function in an embedded workbook
With a cell selected in the Live result column of the embedded workbook, you can press F2 to see its underlying
formula. You can change the formula in the cell or you can copy or edit and then paste the formula to another cell
and experiment with it there.
http://go.microsoft.com/fwlink/?LinkID=223318&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223318&clcid=0x409&app=ZXL&ver=14http://go.microsoft.com/fwlink/?LinkID=223318&clcid=0x409&app=ZXL&ver=14 -
8/2/2019 IT Answers - Excel Functions
32/37
You can download the workbook by clicking the View full-size workbook button in the lower-right corner of the
embedded workbook (at the right end of the black bar, above). Clicking the button loads the workbook in a new
browser window (or tab, depending on your browser settings). Note that you can't type in the worksheet cells in
the full-size browser view.
In full-size browser view, you can then click the Download button , which enables you to open the
entire workbook in Excel or save it to your computer. For some function examples, opening the workbook in the
Excel desktop program allows you to work with array formulas, in which you must press the CTRL+SHIFT+Enter
key combination (this combination does not work in the browser).
-
8/2/2019 IT Answers - Excel Functions
33/37
SQRT function
Show All
This article describes the formula syntax and usage of the SQRTfunctionin Microsoft Excel.
Description
Returns a positive square root.
Syntax
SQRT(number)
The SQRT function syntax has the followingarguments:
Number Required. The number for which you want the square root.
Remark
If number is negative, SQRT returns the #NUM! error value.
Example
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
1. Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at
a time.Important Do not select the row or column headers.
1. Press CTRL+C.
2. Create a blank workbook or worksheet.
3. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying and
pasting for each cell in the example.
1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+` (grave
accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
A B
Data
http://appendpopup%28this%2C%27113284751_1%27%29/http://appendpopup%28this%2C%27113284751_1%27%29/http://appendpopup%28this%2C%27113284751_1%27%29/http://appendpopup%28this%2C%27731216311_2%27%29/http://appendpopup%28this%2C%27731216311_2%27%29/http://appendpopup%28this%2C%27731216311_2%27%29/http://togglediv%28%27divexpcollasst_715384815%27%29/http://togglediv%28%27divexpcollasst_715384815%27%29/http://togglediv%28%27divexpcollasst_715384815%27%29/http://togglediv%28%27divexpcollasst_715384815%27%29/http://appendpopup%28this%2C%27731216311_2%27%29/http://appendpopup%28this%2C%27113284751_1%27%29/ -
8/2/2019 IT Answers - Excel Functions
34/37
2
3
4
5
6
-16
Formula Description (Result)
=SQRT(16) Square root of 16 (4)
=SQRT(A2) Square root of the number above. Because the number is negative, an error is returned
(#NUM!)
=SQRT(ABS(A2)) Square root of the absolute value of the number above (4)
See Also
-
8/2/2019 IT Answers - Excel Functions
35/37
STDEV function
Estimates standard deviation based on a sample. The standard deviation is a measure of how widely values are
dispersed from the average value (the mean).
IMPORTANT This function has been replaced with one or more new functions that may provide improved
accuracy and whose names better reflect their usage. Although this function is still available for backward
compatibility, you should consider using the new functions from now on, because this function may not be
available in future versions of Excel.
For more information about the new function, seeSTDEV.S function.
Syntax
STDEV(number1,[number2],...])
The STDEV function syntax has the followingarguments:
Number1 Required. The first number argument corresponding to a sample of a population.
Number2, ... Optional. Number arguments 2 to 255 corresponding to a sample of a population. You can also
use a single array or a reference to an array instead of arguments separated by commas.
Remarks
STDEV assumes that its arguments are a sample of the population. If your data represents the entire
population, then compute the standard deviation using STDEVP.
The standard deviation is calculated using the "n-1" method.
Arguments can either be numbers or names, arrays, or references that contain numbers.
Logical values and text representations of numbers that you type directly into the list of arguments are
counted.
If an argument is an array or reference, only numbers in that array or reference are counted. Empty cells,
logical values, text, or error values in the array or reference are ignored.
Arguments that are error values or text that cannot be translated into numbers cause errors.
If you want to include logical values and text representations of numbers in a reference as part of the
calculation, use the STDEVA function.
STDEV uses the following formula:
http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010335698&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010335660http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010335698&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010335660http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010335698&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010335660http://appendpopup%28this%2C%27805576038_1%27%29/http://appendpopup%28this%2C%27805576038_1%27%29/http://appendpopup%28this%2C%27805576038_1%27%29/http://appendpopup%28this%2C%27805576038_1%27%29/http://office.microsoft.com/client/helppreview14.aspx?AssetId=HP010335698&lcid=16393&NS=EXCEL&Version=14&tl=2&CTT=5&origin=HP010335660 -
8/2/2019 IT Answers - Excel Functions
36/37
where x is the sample mean AVERAGE(number1,number2,) and n is the sample size.
Example
Suppose 10 tools stamped from the same machine during a production run are collected as a random sample
and measured for breaking strength.
The example may be easier to understand if you copy it to a blank worksheet.
How do I copy an example?
Select the example in this article. If you are copying the example in Excel Web App, copy and paste one cell at a
time.Important Do not select the row or column headers.
1. Press CTRL+C.
2. Create a blank workbook or worksheet.
3. In the worksheet, select cell A1, and press CTRL+V. If you are working in Excel Web App, repeat copying
and pasting for each cell in the example.
1. To switch between viewing the results and viewing the formulas that return the results, press CTRL+`
(grave accent), or on the Formulas tab, in the Formula Auditing group, click the Show Formulas button.
1
2
3
4
5
6
7
8
9
10
11
12
13
A
Strength
1345
1301
1368
1322
1310
1370
1318
1350
1303
1299
Formula Description (Result)
http://togglediv%28%27divexpcollasst_235157744%27%29/http://togglediv%28%27divexpcollasst_235157744%27%29/http://togglediv%28%27divexpcollasst_235157744%27%29/http://togglediv%28%27divexpcollasst_235157744%27%29/ -
8/2/2019 IT Answers - Excel Functions
37/37
=STDEV(A2:A11) Standard deviation of breaking strength (27.46392)