Infinite opportunities?  Endless problems?  Limited resources?  Talk to us!
Operations
Consulting
Software
Consulting
Publishing and
Training
Applied
Solutions
Excel add-ins
and tutorials
Charts Excel and VBA
Case Studies
VBA
tutorials
PowerPoint
Add-Ins
Miscellenia
You are on the Home/Excel/Array formulas page
About this site

What's new

Google
Web
This Site
 

 

Ever since I found the Excel newsgroups, my knowledge of array formulas has increased in leaps and bounds.  These pages reflect my own take on the subject.

Basic Building Blocks

 
Create a list (an array) of the numbers 1,2,...,n
 
Use
=ROW(INDIRECT("1:n")), or
=ROW(OFFSET($A$1, 0, 0, n, 1))

 

Sort a range of numbers in descending order
 Alternative 1:
Use
=LARGE(aRng,ROW(INDIRECT("1:"&ROWS(aRng))))
 

Explanation:

Alternative 2:

Use
=LARGE(aRng,ROW(aRng)-ROW(OFFSET(aRng,0,0,1,1))+1)
 
   

 

Formulas to

Create a matrix with ones on the cross-diagonal (cells in a NxN matrix where the row number + the column number equals n+1).  Used to reverse the row order or the column order of any MxN matrix. Harlan Grove's post on the method

 

Reverse the row-order or column-order of elements in a matrix
Reverse the elements in a column list using the INDEX function Alan Beban's post
Reverse cells across rows and columns using the OFFSET function. Laurent Longre's post
Multiple ways to reverse the elements in a column list. Chip Pearson's post
A general formula to reverse the row order or the column order using matrix multiplication. Harlan Grove's post

 

 

For custom technology solutions, operations consulting, or training contact web-underscore-contact@tushar-hyphen-mehta-dot-cee-oh-em.
By accessing any page or link on this web site other than this page, you agree to the terms and conditions.

Ads from amazon.com

[Optional] Survey (current rating of site: 3.7 out of 4)  If you will take a moment to provide your comments, it will help improve the site both for you, and for other visitors.

On a scale of 4 (just what I need)
to zero (totally useless)

How do you rate the information

on this page?

  on this site?

[Optional]

Your name
Your email address
Other comments
 
Monitor page
for changes
  
it's private   

by ChangeDetection
A comment selected at random:

 

Copyright © 2000-2008 Tushar Mehta.
Send comments and suggestions about the web site to webmaster@tushar-hyphen-mehta-dot-cee-oh-em
Last edited April 14, 2008