?
Solved

understanding index formulae

Posted on 2011-09-17
1
Medium Priority
?
227 Views
Last Modified: 2012-08-13
Dear experts,

Could someone help me understand the below formulae:

I have understood the sections of '=INDEX(D2:BU2' and 'MATCH(1,D8:BU8,0))'.

=INDEX(D2:BU2,1,MATCH(1,D8:BU8,0))

what i am strugling is the reason for inclusion of '1' before ',match'.

Kindly help.
0
Comment
Question by:Excellearner
1 Comment
 
LVL 50

Accepted Solution

by:
barry houdini earned 2000 total points
ID: 36554434
Hello Excellearner

The syntax of INDEX is

=INDEX(array,row_num,col_num)

so the 1 indicates that the value should be returned from row 1 of the array. In this case the array has only one row so that 1 is superfluous and can be omitted - [excel help says - If array contains only one row or column, the corresponding row_num or column_num argument is optional] this will give the same result

=INDEX(D2:BU2,MATCH(1,D8:BU8,0))

MATCH finds the first 1 in D8:BU8 and returns the position then, as that result is used as col_num in INDEX the effect is to return the row 2 entry from the same column, e.g. if 1 is found first in F8 then MATCH returns 3 and then this

=INDEX(D2:BU2,3)

returns the value from F2

It's a little like HLOOKUP but unlike HLOOKUP you can do a lookup in one row (row 8) and return a value from a higher row (row 2)

regards, barry
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Do you use a spreadsheet like Microsoft's Excel?  Have you ever wanted to link out to a non excel file on your computer or network drive?  This is the way I found to do it!
Windows Explorer let you handle zip folders nearly as any other folder: Copy, move, change, and delete, etc. In VBA you can also handle normal files and folders, but zip folders takes a little more - and that you'll find here.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

862 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question