11.08.2013 Views

Excel's Formula - sisman

Excel's Formula - sisman

Excel's Formula - sisman

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

368<br />

Part IV: Array <strong>Formula</strong>s<br />

A multicell array formula<br />

Figure 14-1 shows a simple worksheet set up to calculate product sales. Normally, you would calculate<br />

the value in column D (total sales per product) with a formula such as the one that follows,<br />

and then copy this formula down the column:<br />

=B2*C2<br />

After copying the formula, the worksheet contains six formulas in column D.<br />

Figure 14-1: Column D contains formulas to calculate the total sales for each product.<br />

Another alternative uses a single formula (an array formula) to calculate all six values in D2:D7.<br />

This single formula occupies six cells and returns an array of six values.<br />

To create a single array formula to perform the calculations, follow these steps:<br />

1. Select a range to hold the results.<br />

In this example, the range is D2:D7.<br />

2. Enter the following formula:<br />

=B2:B7*C2:C7<br />

3. Normally, you press Enter to enter a formula. Because this is an array formula, however,<br />

you press Ctrl+Shift+Enter.<br />

The formula is entered into all six selected cells. If you examine the <strong>Formula</strong> bar, you’ll see the<br />

following:<br />

{=B2:B7*C2:C7}<br />

Excel places curly brackets around the formula to indicate that it’s an array formula.<br />

This formula performs its calculations and returns a six-item array. The array formula actually<br />

works with two other arrays, both of which happen to be stored in ranges. The values for the first<br />

array are stored in B2:B7, and the values for the second array are stored in C2:C7.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!