Microsoft Office Excel 2013 Tutorial 4-Creating array formulas
1. Array formulas
j
then press F5 or click Slide Show > From Beginning to start the course.
In the message bar, click Enable Editing,
If the videos in this course don’t play, you may need to
download QuickTime or just switch to PowerPoint 2013.
2. 5 61 2 3 4
Course summary Help
1/3 videos
Array formulas Closed captions
Summary Feedback HelpArray formulas Use functions Edit arrays
2:252:57 4:24
Press F5 to start, Esc to stop
You want to calculate the total of a large range of cells, such as the value of these stocks.You could type = sign, B2 (the number of Contoso shares),asterisk to multiply, B3, the share price, the + sign to add, C2, asterisk, C3, and so on.But it would take forever with a large series, and it would be easy to make a mistake and not notice it.An easier way? Use an array formula. An array is a series of data in a row, column, or a combination of rows
and columns.
You’ve probably used them before. B2:F2 is an array, also commonly referred to as a range of cells.An array formula performs calculations on the data in one or more arrays, returning either a single or
multiple results.
With an array formula, you type = sign, SUM, opening parenthesis,select the cells in the Shares row (this is the first array in the array formula), then an asterisk to multiply,select the cells in the Price row (this is the second array in the array formula).And this is the key difference when you enter an array formula, you press Ctrl + Shift + Enter, not just Enter.If you press just Enter, you’ll get either an incorrect value if the regular function’s valid, or a value error if it’s
not.
I didn’t type a closing parenthesis in the formula, pressing Ctrl + Shift + Enter does this for you.The array formula multiplies each cell in the Shares row by the respective cell in the Price row and then
sums,
or adds these and returns the total of $14,421.87.In the formula bar, the formula’s enclosed in braces, { }, meaning it’s an array formula.This is automatically done when you press Ctrl + Shift + Enter. Don’t type these braces.If you do, Excel will interpret your formula as text, not as a formula.Up next: Use SUM, AVERAGE, and MAX in array formulas.
3. 5 61 2 3 4
Course summary Help
2/3 videos
Array formulas Closed captions
Summary Feedback Help
Press F5 to start, Esc to stop
We created an array formula that returned a single value in the first video in this course, Array formulas.But an array formula can also return multiple values.For example, to calculate a subtotal for each stock, select the cells you want to contain the subtotals, type an
= sign,
select the cells in the Shares row, type an asterisk to multiply, select the cells in the Price row,and for an array formula, press Ctrl + Shift + Enter, not just Enter.In each cell the array formula multiplies a cell in the Shares rowwith the respective cell in the Price row and returns the subtotal.This worksheet contains sales for a number of years. I want to know the average annual increase in sales
across all years.
To calculate the increase in sales from just 2013 to 2014, type an = sign,select the cell with the sales for the subsequent year (2014),type a - sign, select the cell with the sales for previous year (2013), and press Enter.This returns $8,868.88, the sales increase from 2013 to 2014.We could do this for every year and then average the results to get the average annual increase in sales
across all years.
That’s the equation in F9. If we had data for many more years, or we had month to month data,this equation would be a nightmare to create and maintain.Using an array formula, we type = sign, AVERAGE, opening parenthesis,select the sales for subsequent years (2014 through 2018), type a - sign, select the sales for the previous
years,
(2013 through 2017), type a closing parenthesis, and press Ctrl + Shift + Enter.The array formula calculates the increase in sales for each year, averages those values,and returns $11,464.32, the average annual increase in sales.This worksheet contains the opening and closing prices for a stock. I want to know what the biggest gain
was in a day.
To calculate the difference between the opening and closing price for a specific day, you type, = sign,select or type the cell with the closing price for the day, type a - sign to subtract,select the cell with the opening price, and press Enter.With just a few rows of data, you could copy the formula down the column and pick-out the biggest gain.With a lot of rows, this would more time consuming and if the data changed,the result would be hard to use in another formula.Using an array formula, I type, = sign, MAX (the MAX function returns the biggest, or maximum, value),opening parenthesis, select or type the cells with the closing values, type the - sign,select the cells with the opening values, and press Ctrl + Shift + Enter.The array formula takes the closing price for each day, subtracts the opening price,and then uses the MAX function to return the maximum value, 98 cents.Up next: Edit and delete array formulas.
Array formulas Use functions Edit arrays
2:252:57 4:24
4. 5 61 2 3 4
Course summary Help
3/3 videos
Array formulas Closed captions
Summary Feedback Help
Press F5 to start, Esc to stop
Editing an array formula requires special steps.If the array formula is in a single cell, like Total, select the cell, press F2, edit the formula,such as expanding or contracting the arrays, and then press Ctrl + Shift + Enter.If the array formula is in multiple cells it’s trickier.Select all of the cells, press F2, edit the formula, and press Ctrl + Shift + Enter.Cell F5 displays an error because we contracted the arrays in the formula.I want to delete the cell, but you can’t delete individual cells that are in an array formula;you get this error that says you can’t change part of an array. You can delete all of the cells and then re-
create the formula.
You can’t add a new cell to a block of cells that already contain an array formula.I couldn’t add it to G5, for example.You can type the same array formula in the cell, but then you’d need to remember to update both array
formulas.
We recommend that you delete the original formula and re-create it.You can’t move individual cells that are in an array formula; you’ll get the same error.You can move all of the cells. Select the cells, right click them, and click Cut.Right-click where you want to paste them, and click Paste. And the cell references will remain the same.Now you’ve got a pretty good idea about how to use array formulas. Of course, there’s always more to
learn.
So check out the course summary at the end, and best of all, explore Excel 2013 on your own.
Array formulas Use functions Edit arrays
2:252:57 4:24
5. Help Course summary
Press F5 to start, Esc to stop
Course summary—Array formulas
Summary Feedback Help
5 61 2 3 4
Array formulas Use functions Edit arrays
2:252:57 4:24
Why use array formulas?
Array formulas are often referred to as CSE
(Ctrl+Shift+Enter) formulas because instead of just
pressing Enter, you press Ctrl+Shift+Enter to complete
the formula.
If you have experience using formulas in Excel, you
know that you can perform some fairly sophisticated
operations. For example, you can calculate the total
cost of a loan over any given number of years. You can
use array formulas to do complex tasks, such as:
• Count the number of characters that are
contained in a range of cells.
• Sum only numbers that meet certain conditions,
such as the lowest values in a range or numbers
that fall between an upper and lower boundary.
• Sum every nth value in a range of values.
Enter an array formula
1. Select the cells where you want to see your
results.
2. Enter your formula.
3. Press Ctrl+Shift+Enter. Excel fills each of the cells
you selected with the result.
Delete an array formula
You've expanded an array formula too far— it
includes too much data—so you press Delete to
remove the formula and... it's still there. To remove
an array formula, you delete it from one cell, then
press Ctrl+Shift+Enter to delete the it from the rest
of the cells.
1. Select the cells that contain your formula.
2. Press Delete.
See also
• Guidelines and examples of array
formulas
• Create an array formula
• Rules for changing array formulas
• More training courses
• Office Compatibility Pack
6. Check out more courses
Help Course summary
Press F5 to start, Esc to stop
Rating and comments
Thank you for viewing this course!
Please tell us what you think
Summary Feedback Help
5 61 2 3 4
Array formulas Use functions Edit arrays
2:252:57 4:24
7. Help Course summary
Press F5 to start, Esc to stop
Help
Summary Feedback Help
5 61 2 3 4
Using PowerPoint’s video controls
Going places
Stopping a course
If you download a course and the videos don’t play
get the PowerPoint Viewer. the QuickTime
player upgrade to PowerPoint 2013
Array formulas Use functions Edit arrays
2:252:57 4:24