Putting Advanced Array Formulas To Work - Excel
Putting Advanced Array Formulas To Work - Excel
By John Walkenbach Adapted for Office Online by Colin Wilcox The examples in this reference page show some advanced ways to use array formulas in Excel. APPLIES TO Microsoft Excel 2003 Excel 2002 See all Power User columns Read the Office blogs This is a reference page of examples for use with the Power User columns Introducing Array Formulas in Excel and More Arrays: Introducing Array Constants in Excel. To make the best use of the examples provided here, you need to be familiar with either array formulas or the content of those columns. If you prefer the depth and detail that a book can provide, see chapters 14 and 15 of Excel 2002 Formulas, by John Walkenbach. The examples here show you some advanced ways to put array formulas and constants to work. The examples use named ranges such as "Data" instead of specific cell ranges such as "A1:C7." For basic array formula examples, see Putting Basic Array Formulas to Work. For a larger set of both basic and advanced examples, see John's book.
4/17/2014
=SUM((Sales>0)*(Sales<=5)*(Sales)) Keep in mind that this formula returns an error if the range contains one or more non-numeric cells. You can also create array formulas that use a type of OR condition. For example, you can sum values that are less than 5 and greater than 15: =SUM(IF((Sales<5)+(Sales>15),Sales)) The IF function finds all values smaller than 5 and greater than 15 and then passes those values to the SUM function. Important You can't use the AND and OR functions in array formulas directly. Why not? Those functions return a single result, either TRUE or FALSE, and array functions require arrays of results. You can work around the problem by using the logic shown in the previous formula. In other words, you perform math operations such as addition or multiplication on values that meet the OR or AND condition.
A final note
The examples on this page are a subset of the examples that John Walkenbach created for Excel 2002 Formulas. If the examples provided here don't meet your needs, see chapter 15 of the book.
More information
For information about creating array formulas, see Introducing Array Formulas in Excel and More Arrays: Introducing Array Constants in Excel. For some introductory array formula examples, see Putting Basic Array Formulas to Work.
4/17/2014
Site Directory
Contact Us
Submit Feedback
Legal
Trademarks
Accessibility
http://office.microsoft.com/en-in/excel-help/putting-advanced-array-formulas-to-work-HA001087227.aspx
3/3