excel magic trick 778 index &amp exercise sheet

60
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18

Upload: chandan53

Post on 25-Oct-2014

131 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

123456789

1011

12131415161718

Page 2: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH Functions BasicsINDEX Basics: Two way lookupOne way lookup vertical (lookup Left)One way lookup horizontalOne way lookup with lookup column and match column orientated differentlyINDEX & MATCH to do approximate lookup on table sorted DescendingLookup whole rowLookup whole columnLookup Cell ReferenceDynamic RangeLookup from more than one table when tables are on same sheet as formula

INDEX and ROWS to Flip a TableGet Amount in Next BracketSelect a Random ValueLookup first non-blank valueHandle arrays that require CSEBasic lookup tool used in complex array formulas for extracting data

Lookup from more than one table when tables are on a different sheet than the formula: CHOOSE, INDEX, MATCH functions

Page 3: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH function is a lookup function that returns the relative position of an item in a list

Match w 0 (Exact Match)

Only 1 in list Dups Not in ListLookup Jo Tom Sue JoRelative Position

List 1 List 1 Joe JoJoeJoTomSiouxSiouxSiouxTom

MATCH with 1 or Empty & Sorted Ascending (Approximate Match - 1st Biggest & Jump Back)

Fits in Gap Finds Exact Value Smaller Than First Bigger than LastLookup $150.00 $100.00 -$400.00 $20,000.00 $50.00Relative Position

List 1 List 1 $0.00 $100.00 $0.00

$100.00 100 <= x < 500$500.00

$1,000.00 $2,500.00 $5,000.00

$10,000.00

MATCH with -1 & Sorted Descending (Approximate Match - 1st Smallest & Jump Back)

Fits in Gap Finds Exact Value Bigger Than FirstLookup $1,500.00 $2,500.00 $20,000.00 -$10.00 $9,000.00

lookup_value is the value you tell the match function to lookuplookup_array is the list that you look an item up in

[match_type] tells the MATCH what sort of lookup to do:

1 or empty = aproximate match; table sorted ascending; first bigger value bumped into then jump back one position, if value is smaller than first item returns #N/A, if bigger than last it returns last value

2 = extact match, if duplicates, it finds first one only, can't find it it shows #N/A

-1 = aproximate match; table sorted descending; first smaller value bumped into then jump back one position, if value is bigger than first item returns #N/A, if smaller than last it returns last value

MATCH can do vertical or horizontal

MATCH can do vertical or horizontal

Smaller than Last

MATCH can do vertical or horizontal

Page 4: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Relative Position

List 1 List 1 $10,000.00 $5,000.00 $10,000.00

$5,000.00 $2,500.00 $1,000.00

$500.00 $100.00

$0.00

Page 5: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH function is a lookup function that returns the relative position of an item in a list

Tom Sioux Sioux Sioux Tom List 20

1%2%4%5%6%8%

$500.00 $1,000.00 $2,500.00 $5,000.00 $10,000.00

is the value you tell the match function to lookup is the list that you look an item up in

tells the MATCH what sort of lookup to do:

= aproximate match; table sorted ascending; first bigger value bumped into then jump back one position, if value is smaller than first item returns #N/A, if bigger than last it returns last value

= extact match, if duplicates, it finds first one only, can't find it it shows #N/A

= aproximate match; table sorted descending; first smaller value bumped into then jump back one position, if value is bigger than first item returns #N/A, if smaller than last it returns last value

Page 6: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

$2,500.00 $1,000.00 $500.00 $100.00 $0.00

Page 7: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH function is a lookup function that returns the relative position of an item in a list

Match w 0 (Exact Match)

Only 1 in list Dups Not in ListLookup Jo Tom Sue JoRelative Position 2 3 #N/A 2

List 1 List 1 Joe JoJoeJoTomSiouxSiouxSiouxTom

MATCH with 1 or Empty & Sorted Ascending (Approximate Match - 1st Biggest & Jump Back)

Fits in Gap Finds Exact Value Smaller Than First Bigger than LastLookup $150.00 $100.00 -$400.00 $20,000.00 $50.00Relative Position 2 2 #N/A 7 1

List 1 List 1 $0.00 $100.00 $0.00

$100.00 $500.00

$1,000.00 $2,500.00 $5,000.00

$10,000.00

MATCH with -1 & Sorted Descending (Approximate Match - 1st Smallest & Jump Back)

Fits in Gap Finds Exact Value Bigger Than FirstLookup $1,500.00 $2,500.00 $20,000.00 -$10.00 $9,000.00

lookup_value is the value you tell the match function to lookuplookup_array is the list that you look an item up in

[match_type] tells the MATCH what sort of lookup to do:

1 or empty = aproximate match; table sorted ascending; first bigger value bumped into then jump back one position, if value is smaller than first item returns #N/A, if bigger than last it returns last value

2 = extact match, if duplicates, it finds first one only, can't find it it shows #N/A

-1 = aproximate match; table sorted descending; first smaller value bumped into then jump back one position, if value is bigger than first item returns #N/A, if smaller than last it returns last value

MATCH can do vertical or horizontal

MATCH can do vertical or horizontal

Smaller than Last

MATCH can do vertical or horizontal

Page 8: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Relative Position 3 3 #N/A 7 1

List 1 List 1 $10,000.00 $5,000.00 $10,000.00

$5,000.00 $2,500.00 $1,000.00

$500.00 $100.00

$0.00

Page 9: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH function is a lookup function that returns the relative position of an item in a list

Tom Sioux Sioux Sioux Tom List 20

1%2%4%5%6%8%

$500.00 $1,000.00 $2,500.00 $5,000.00 $10,000.00

is the value you tell the match function to lookup is the list that you look an item up in

tells the MATCH what sort of lookup to do:

= aproximate match; table sorted ascending; first bigger value bumped into then jump back one position, if value is smaller than first item returns #N/A, if bigger than last it returns last value

= extact match, if duplicates, it finds first one only, can't find it it shows #N/A

= aproximate match; table sorted descending; first smaller value bumped into then jump back one position, if value is bigger than first item returns #N/A, if smaller than last it returns last value

Page 10: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

$2,500.00 $1,000.00 $500.00 $100.00 $0.00

Page 11: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX is a lookup function that can do a two-way lookup.

The intersection of the row and column is the value that is returned to the cell or formula

Discount TablePartID/Qty 1 5 25 100Part1 13.00% 15.00% 17.00% 19.00%Part2 14.00% 16.00% 18.00% 20.00%Part3 15.00% 17.00% 19.00% 21.00%Part4 16.00% 18.00% 20.00% 22.00%Part5 17.00% 19.00% 21.00% 23.00%Part6 18.00% 20.00% 22.00% 24.00%

PartID Part3 <<== RowQty 5 <<==ColumnDiscount <<== Returned Value

array argument is the two dementioanl table (both a row and a column - that is the two-way part of it)row_num argument tells index which row to look at

column_num argument tells index which colum to look at

Page 12: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX is a lookup function that can do a two-way lookup.

The intersection of the row and column is the value that is returned to the cell or formula

argument is the two dementioanl table (both a row and a column - that is the two-way part of it) argument tells index which row to look at argument tells index which colum to look at

Page 13: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX is a lookup function that can do a two-way lookup.

The intersection of the row and column is the value that is returned to the cell or formula

Discount TablePartID/Qty 1 5 25 100Part1 13.00% 15.00% 17.00% 19.00%Part2 14.00% 16.00% 18.00% 20.00%Part3 15.00% 17.00% 19.00% 21.00%Part4 16.00% 18.00% 20.00% 22.00%Part5 17.00% 19.00% 21.00% 23.00%Part6 18.00% 20.00% 22.00% 24.00%

PartID Part4 4 <<== RowQty 22 2 <<==ColumnDiscount 18.00% <<== Returned Value

array argument is the two dementioanl table (both a row and a column - that is the two-way part of it)row_num argument tells index which row to look at

column_num argument tells index which colum to look at

Page 14: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX is a lookup function that can do a two-way lookup.

The intersection of the row and column is the value that is returned to the cell or formula

argument is the two dementioanl table (both a row and a column - that is the two-way part of it) argument tells index which row to look at argument tells index which colum to look at

Page 15: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Product Price DescriptionBoom01 $15.00 Flying Range is 10Boom02 $30.00 Flying Range is 20Boom03 $40.00 Flying Range is 50Boom04 $45.00 Flying Range is 60Boom05 $65.00 Flying Range is 70Boom06 $69.00 Flying Range is 80Boom07 $100.00 Flying Range is 85Boom08 $110.00 Flying Range is 110Boom09 $165.00 Flying Range is 160

1-Way Lookup Vertical: Lookup Column to LeftDescription ProductFlying Range is 160 **[column_num] argument is optional. When you have a one

way lookup, row_num can be used for the relative position ofthe item in a list (row or column).

Use INDEX, MAX & MATCH to find student with max scoreName ScoreStudent 1 53Student 2 18Student 3 99Student 4 45Student 5 19Student 6 27Student 7 85Student 8 0

Max99 <== lookup name w max score, no duplicates

Use INDEX as a substitute for VLOOKUP when the value you want to return is to the left of the lookup column.

Lookup Name w Max Score

Page 16: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

**[column_num] argument is optional. When you have a oneway lookup, row_num can be used for the relative position ofthe item in a list (row or column).

Page 17: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Product Price DescriptionBoom01 $15.00 Flying Range is 10Boom02 $30.00 Flying Range is 20Boom03 $40.00 Flying Range is 50Boom04 $45.00 Flying Range is 60Boom05 $65.00 Flying Range is 70Boom06 $69.00 Flying Range is 80Boom07 $100.00 Flying Range is 85Boom08 $110.00 Flying Range is 110Boom09 $165.00 Flying Range is 160

1-Way Lookup: Lookup Column to LeftDescription ProductFlying Range is 80 Boom06 **[column_num] argument is optional. When you have a one

way lookup, row_num can be used for the relative position ofthe item in a list (row or column).

Use INDEX, MAX & MATCH to find student with max scoreName ScoreStudent 1 53Student 2 18Student 3 99Student 4 45Student 5 19Student 6 27Student 7 85Student 8 0

Max99 Student 3 <== lookup name w max score

Use INDEX as a substitute for VLOOKUP when the value you want to return is to the left of the lookup column.

Lookup Name w Max Score

Page 18: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

**[column_num] argument is optional. When you have a oneway lookup, row_num can be used for the relative position ofthe item in a list (row or column).

Page 19: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Use INDEX, MIN & MATCH to find vendor name with low bid

Vendor1 Vendor2 Vendor3 Vendor4 Vendor5 Low BidProduct1 $38.99 $48.60 $43.53 $40.08 $47.92 $38.99 1-Way Lookup Ranges HorizontalProduct2 $57.68 $31.80 $52.78 $31.42 $55.19 $31.42 Product3 $53.32 $32.64 $37.69 $48.29 $41.59 $32.64 **Note: If it is a one way lookup, INDEX isProduct4 $35.20 $40.55 $32.65 $36.81 $41.14 $32.65 programmed to use the row_num forProduct5 $56.72 $47.16 $36.42 $49.56 $39.25 $36.42 either a row number or column numberProduct6 $47.91 $35.08 $51.13 $49.84 $42.12 $35.08 (because it is only a 1-way lookup).Product7 $34.81 $35.11 $48.63 $33.32 $37.83 $33.32 Product8 $42.25 $35.76 $58.60 $46.28 $40.53 $35.76 Product9 $40.14 $42.31 $37.62 $59.97 $42.57 $37.62 Product10 $36.48 $40.79 $53.24 $51.01 $51.24 $36.48 Product11 $38.57 $40.06 $54.71 $39.70 $54.73 $38.57 Product12 $52.66 $43.61 $59.98 $34.61 $52.65 $34.61

Products/Vendors

Vendor for Low Bid

Page 20: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

1-Way Lookup Ranges Horizontal

**Note: If it is a one way lookup, INDEX isprogrammed to use the row_num foreither a row number or column number(because it is only a 1-way lookup).

Page 21: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Use INDEX, MIN & MATCH to find vendor name with low bid

Vendor1 Vendor2 Vendor3 Vendor4 Vendor5 Low BidProduct1 $38.99 $48.60 $43.53 $40.08 $47.92 $38.99 Vendor1 1-Way Lookup Ranges HorizontalProduct2 $57.68 $31.80 $52.78 $31.42 $55.19 $31.42 Vendor4Product3 $53.32 $32.64 $37.69 $48.29 $41.59 $32.64 Vendor2 **Note: If it is a one way lookup, INDEX isProduct4 $35.20 $40.55 $32.65 $36.81 $41.14 $32.65 Vendor3 programmed to use the row_num forProduct5 $56.72 $47.16 $36.42 $49.56 $39.25 $36.42 Vendor3 either a row number or column numberProduct6 $47.91 $35.08 $51.13 $49.84 $42.12 $35.08 Vendor2 (because it is only a 1-way lookup.Product7 $34.81 $35.11 $48.63 $33.32 $37.83 $33.32 Vendor4Product8 $42.25 $35.76 $58.60 $46.28 $40.53 $35.76 Vendor2Product9 $40.14 $42.31 $37.62 $59.97 $42.57 $37.62 Vendor3Product10 $36.48 $40.79 $53.24 $51.01 $51.24 $36.48 Vendor1Product11 $38.57 $40.06 $54.71 $39.70 $54.73 $38.57 Vendor1Product12 $52.66 $43.61 $59.98 $34.61 $52.65 $34.61 Vendor4

Products/Vendors

Vendor for Low Bid

Page 22: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

1-Way Lookup Ranges Horizontal

**Note: If it is a one way lookup, INDEX isprogrammed to use the row_num foreither a row number or column number(because it is only a 1-way lookup.

Page 23: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

DescriptionFlying Range is 10 Description ProductFlying Range is 20 Flying Range is 50Flying Range is 50Flying Range is 60 Product Boom01 Boom02 Boom03 Boom04 Boom05Flying Range is 70Flying Range is 80 **Note: If it is a one way lookup, INDEX isFlying Range is 85 programmed to use the row_num forFlying Range is 110 either a row number or column numberFlying Range is 160 (because it is only a 1-way lookup.

1-Way Lookup: Vertical and Horizontal

Page 24: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Boom06 Boom07 Boom08 Boom09

Page 25: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

DescriptionFlying Range is 10 Description ProductFlying Range is 20 Flying Range is 50 Boom03Flying Range is 50Flying Range is 60 Product Boom01 Boom02 Boom03 Boom04 Boom05 Boom06Flying Range is 70Flying Range is 80 **Note: If it is a one way lookup, INDEX isFlying Range is 85 programmed to use the row_num forFlying Range is 110 either a row number or column numberFlying Range is 160 (because it is only a 1-way lookup.

1-Way Lookup: Vertical and Horizontal

Page 26: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Boom07 Boom08 Boom09

Page 27: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX and MATCH to lookup in a table that is sorted decending order

Select Rainfall Rate 4 2-Way lookupPipe Size 11 MATCH with -1 (list sorted Descending)Square Footage MATCH with 1 or empty (list sorted Ascending)

Rainfall RatePipe Size (inches) 1 2 3 4 5 6

15 238,000 119,000 79,333 59,500 47,600 39,65012 133,200 66,600 44,400 33,300 26,650 22,20010 82,800 41,400 27,600 20,700 16,580 13,800

8 46,000 23,000 15,330 11,500 9,200 7,6706 21,400 10,700 7,133 5,350 4,280 3,5665 13,360 6,680 4,453 3,340 2,672 2,2274 7,520 3,760 2,506 1,880 1,504 1,2533 3,288 1,644 1,096 822 657 5481 0 0 0 0 0 0

Page 28: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH with -1 (list sorted Descending)MATCH with 1 or empty (list sorted Ascending)

Page 29: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX and MATCH to lookup in a table that is sorted decending order

Select Rainfall Rate 4 2-Way lookupPipe Size 11 MATCH with -1 (list sorted Descending)Square Footage 33,300 MATCH with 1 or empty (list sorted Ascending)

Rainfall RatePipe Size (inches) 1 2 3 4 5 6

15 238,000 119,000 79,333 59,500 47,600 39,65012 133,200 66,600 44,400 33,300 26,650 22,20010 82,800 41,400 27,600 20,700 16,580 13,800

8 46,000 23,000 15,330 11,500 9,200 7,6706 21,400 10,700 7,133 5,350 4,280 3,5665 13,360 6,680 4,453 3,340 2,672 2,2274 7,520 3,760 2,506 1,880 1,504 1,2533 3,288 1,644 1,096 822 657 5481 0 0 0 0 0 0

Page 30: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

MATCH with -1 (list sorted Descending)MATCH with 1 or empty (list sorted Ascending)

Page 31: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Month to add Jan TotalJanJan Feb Mar Apr

1 4 4 53 4 12 11 4 2 2

Month to add Feb TotalFebJan 1 3 1Feb 4 4 4Mar 4 12 2Apr 5 1 2

Use INDEX, MATCH and SUM to retrieve a whole column of values and add them

0 (zero) or empty in row_num argument will return a whole column of values (“all rows” or “entire column”)

Use INDEX, MATCH and SUM to retrieve a whole row of values and add them

0 (zero) or empty in column_num argument will return a whole row of values (“all columns” or “entire row”)

Page 32: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Month to add Mar TotalMar 18Jan Feb Mar Apr

1 4 4 53 4 12 11 4 2 2

Month to add Jan TotalJan 5Jan 1 3 1Feb 4 4 4Mar 4 12 2Apr 5 1 2

Use INDEX, MATCH and SUM to retrieve a whole column of values and add them

0 (zero) or empty in row_num argument will return a whole column of values (“all rows” or “entire column”)

Use INDEX, MATCH and SUM to retrieve a whole row of values and add them

0 (zero) or empty in column_num argument will return a whole row of values (“all columns” or “entire row”)

Page 33: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX to lookup cell reference and create dynamic range works well (better than Table feature) when you have an area that will expand and contract.When pasting Dynamic Range Formula ( Defined Name ) into chart: 1) ChartTools Design Ribbon tab "Select Data" button in Data group,2) then edit the "series" and "category", carefully highlight only cell range (leave "sheet reference") and replace selected range with Defined Name,3) after you enter Defined Name Defined Range Formula into dialog box and look back later the "sheet reference" will be replaced by a workbook reference(in total you will see a workbook reference and the Defined Name).

Lookingup Cell ReferenceDate Sales Dynamic ranges for charts5/13/2011 1 Date5/14/2011 3 Sales5/15/2011 55/16/2011 75/17/2011 95/18/2011 2

From the examples in the book, the homework, examples in class, examples from DVD video, or online research, or from an example you thought up, create two examples of "lookup" using the

INDEX and MATCH functions together.

Page 34: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX to lookup cell reference and create dynamic range works well (better than Table feature) when you have an area that will expand and contract.When pasting Dynamic Range Formula ( Defined Name ) into chart: 1) ChartTools Design Ribbon tab "Select Data" button in Data group,2) then edit the "series" and "category", carefully highlight only cell range (leave "sheet reference") and replace selected range with Defined Name,3) after you enter Defined Name Defined Range Formula into dialog box and look back later the "sheet reference" will be replaced by a workbook reference

Page 35: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX to lookup cell reference and create dynamic range works well (better than Table feature) when you have an area that will expand and contract.When pasting Dynamic Range Formula ( Defined Name ) into chart: 1) ChartTools Design Ribbon tab "Select Data" button in Data group,2) then edit the "series" and "category", carefully highlight only cell range (leave "sheet reference") and replace selected range with Defined Name,3) after you enter Defined Name Defined Range Formula into dialog box and look back later the "sheet reference" will be replaced by a workbook reference(in total you will see a workbook reference and the Defined Name).

Lookingup Cell ReferenceDate Sales Dynamic ranges for charts

5/3/2011 10 Date 5/3/20115/4/2011 15 Sales 105/5/2011 165/6/2011 175/7/2011 185/8/2011 275/9/2011 20

5/10/2011 155/11/2011 155/12/2011 15

From the examples in the book, the homework, examples in class, examples from DVD video, or online research, or from an example you thought up, create two examples of "lookup" using the

INDEX and MATCH functions together.

5/3/2

011

5/4/2

011

5/5/2

011

5/6/2

011

5/7/2

011

5/8/2

011

5/9/2

011

5/10/2

011

5/11/2

011

5/12/2

011$0.00

$5.00

$10.00

$15.00

$20.00

$25.00

$30.00

Sales

Page 36: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

INDEX to lookup cell reference and create dynamic range works well (better than Table feature) when you have an area that will expand and contract.When pasting Dynamic Range Formula ( Defined Name ) into chart: 1) ChartTools Design Ribbon tab "Select Data" button in Data group,2) then edit the "series" and "category", carefully highlight only cell range (leave "sheet reference") and replace selected range with Defined Name,3) after you enter Defined Name Defined Range Formula into dialog box and look back later the "sheet reference" will be replaced by a workbook reference

5/3/2

011

5/4/2

011

5/5/2

011

5/6/2

011

5/7/2

011

5/8/2

011

5/9/2

011

5/10/2

011

5/11/2

011

5/12/2

011$0.00

$5.00

$10.00

$15.00

$20.00

$25.00

$30.00

Sales

Page 37: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Product 1 Pro Amount of Sale Table Discount ? Discount ?$0.00 0.00% Product 1 $3,225.00

$500.00 1.00% Product 3 $2,014.00 $1,500.00 2.00% Product 1 $1,264.00 $5,000.00 3.00% Product 1 $1,755.00

Product 3 $4,609.00 Product 3 $9,300.00 Product 3 $8,850.00

Product 2 Product 1 $2,641.00 $0.00 0.00% Product 1 $8,028.00

$500.00 1.50% Product 1 $3,288.00 $1,500.00 2.50% Product 2 $1,434.00 $5,000.00 4.00% Product 1 $2,295.00

Product 2 $3,808.00 Product 2 $8,949.00 Product 2 $489.00

Product 3 Product 1 $7,984.00 $0.00 0.00% Product 1 $9,610.00

$500.00 0.50% Product 1 $5,376.00 $1,500.00 1.00% Product 3 $5,596.00 $5,000.00 1.50%

INDEX is a lookup function that can do a two-way lookup.

Product 1 1Product 2 2Product 3 3

If tables are on different sheets, use the CHOOSE function in the array argument of INDEX.CHOOSE function:1) CHOOSE can return a value or a range from a list of 1 to 254 arguments.2) =CHOOSE(index_num, value1,value2, …)

3)

4)

5)

reference argument is the two dimensional table (or a 1-way lookup) - references must be cell references and must be on the same sheet as the formula. Tables must be placed in numerical order, separated by commas and

contained in parenthesis. Like: (ref1,ref2,ref3...)row_num argument tells index which row to look at

column_num argument tells index which colum to look at[area_num] argument tells the function which table to look at and must be a number 1, 2, 3, etc.

When the "lookup_value" / index_number is whole number between 1 and 254, CHOOSE can be a good lookup tool

If index_num is 1, then value1 is used ...If index_num is 2, then value2 is used

value can be a number, or a formula/function, "text" (in quotes), a range, cell references, or defined names

Page 38: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Pro Amount of SaleProduct 2 $5,243.00

INDEX is a lookup function that can do a two-way lookup.

If tables are on different sheets, use the CHOOSE function in the array argument of INDEX.

CHOOSE can return a value or a range from a list of 1 to 254 arguments. =CHOOSE(index_num, value1,value2, …)

is the two dimensional table (or a 1-way lookup) - references must be cell references and must be on the same sheet as the formula. Tables must be placed in numerical order, separated by commas and

contained in parenthesis. Like: (ref1,ref2,ref3...) argument tells index which row to look at argument tells index which colum to look at

argument tells the function which table to look at and must be a number 1, 2, 3, etc.

When the "lookup_value" / index_number is whole number between 1 and 254, CHOOSE can be a good lookup tool

If index_num is 1, then value1 is used ...If index_num is 2, then value2 is used

value can be a number, or a formula/function, "text" (in quotes), a range, cell references, or defined names

Page 39: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Product 1 Pro Amount of Sale Table Discount ? Discount ?$0.00 0.00% Product 1 $3,225.00 1 64.5 64.5 0.02

$500.00 1.00% Product 3 $2,014.00 3 20.14 20.14 0.01$1,500.00 2.00% Product 1 $1,264.00 1 12.64 12.64 0.01$5,000.00 3.00% Product 1 $1,755.00 1 35.1 35.1 0.02

Product 3 $4,609.00 3 46.09 46.09 0.01Product 3 $9,300.00 3 139.5 139.5 0.015Product 3 $8,850.00 3 132.75 132.75 0.015

Product 2 Product 1 $2,641.00 1 52.82 52.82 0.02$0.00 0.00% Product 1 $8,028.00 1 240.84 240.84 0.03

$500.00 1.50% Product 1 $3,288.00 1 65.76 65.76 0.02$1,500.00 2.50% Product 2 $1,434.00 2 21.51 21.51 0.015$5,000.00 4.00% Product 1 $2,295.00 1 45.9 45.9 0.02

Product 2 $3,808.00 2 95.2 95.2 0.025Product 2 $8,949.00 2 357.96 357.96 0.04Product 2 $489.00 2 0 0 0

Product 3 Product 1 $7,984.00 1 239.52 239.52 0.03$0.00 0.00% Product 1 $9,610.00 1 288.3 288.3 0.03

$500.00 0.50% Product 1 $5,376.00 1 161.28 161.28 0.03$1,500.00 1.00% Product 3 $5,596.00 3 83.94 83.94 0.015$5,000.00 1.50%

INDEX is a lookup function that can do a two-way lookup.

Product 1 1Product 2 2Product 3 3

If tables are on different sheets, use the CHOOSE function in the array argument of INDEX.CHOOSE function:1) CHOOSE can return a value or a range from a list of 1 to 254 arguments.2) =CHOOSE(index_num, value1,value2, …)

3)

4)

5)

reference argument is the two dimensional table (or a 1-way lookup) - references must be cell references and must be on the same sheet as the formula. Tables must be placed in numerical order, separated by commas and

contained in parenthesis. Like: (ref1,ref2,ref3...)row_num argument tells index which row to look at

column_num argument tells index which colum to look at[area_num] argument tells the function which table to look at and must be a number 1, 2, 3, etc.

When the "lookup_value" / index_number is whole number between 1 and 254, CHOOSE can be a good lookup tool

If index_num is 1, then value1 is used ...If index_num is 2, then value2 is used

value can be a number, or a formula/function, "text" (in quotes), a range, cell references, or defined names

Page 40: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Pro Amount of SaleProduct 2 $4,567.00

INDEX is a lookup function that can do a two-way lookup.

If tables are on different sheets, use the CHOOSE function in the array argument of INDEX.

CHOOSE can return a value or a range from a list of 1 to 254 arguments. =CHOOSE(index_num, value1,value2, …)

is the two dimensional table (or a 1-way lookup) - references must be cell references and must be on the same sheet as the formula. Tables must be placed in numerical order, separated by commas and

contained in parenthesis. Like: (ref1,ref2,ref3...) argument tells index which row to look at argument tells index which colum to look at

argument tells the function which table to look at and must be a number 1, 2, 3, etc.

When the "lookup_value" / index_number is whole number between 1 and 254, CHOOSE can be a good lookup tool

If index_num is 1, then value1 is used ...If index_num is 2, then value2 is used

value can be a number, or a formula/function, "text" (in quotes), a range, cell references, or defined names

Page 41: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Score Decimal Grade ROWS from 6 to 1 big # to small450 4 6425 3.7 5350 3 4300 2.5 3270 2 2

0 0 1

Score Decimal Grade Score Decimal Grade Sequential Number w Expandable Range401

123456

Use INDEX to flip (invert) a range 180 degrees:=INDEX(A$2:A$7,ROWS(A2:A$7))

Page 42: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

ROWS from 6 to 1 big # to small ROWS from 1 to 6 small # to big =ROWS(A2:A$7) 1 =ROWS(I$2:I2) =ROWS(A3:A$7) 2 =ROWS(I$2:I3) =ROWS(A4:A$7) 3 =ROWS(I$2:I4) =ROWS(A5:A$7) 4 =ROWS(I$2:I5) =ROWS(A6:A$7) 5 =ROWS(I$2:I6) =ROWS(A7:A$7) 6 =ROWS(I$2:I7)

Sequential Number w Expandable RangeSequential Number w Contracting Range

654321

Page 43: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Score Decimal Grade ROWS from 6 to 1 big # to small450 4 6 =ROWS(A2:A$7)425 3.7 5 =ROWS(A3:A$7)350 3 4 =ROWS(A4:A$7)300 2.5 3 =ROWS(A5:A$7)270 2 2 =ROWS(A6:A$7)

0 0 1 =ROWS(A7:A$7)

Score Decimal Grade Score Decimal Grade0 0 401 3

270 2300 2.5350 3425 3.7450 4

Use INDEX to flip (invert) a range 180 degrees:=INDEX(A$2:A$7,ROWS(A2:A$7))

Page 44: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

ROWS from 1 to 6 small # to big1 =ROWS(I$2:I2)2 =ROWS(I$2:I3)3 =ROWS(I$2:I4)4 =ROWS(I$2:I5)5 =ROWS(I$2:I6)6 =ROWS(I$2:I7)

Page 45: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Use INDEX & MATCH to find how much to get to next bracketSales Amount To Get To Next Bracket

$5,555.00

Commission Table

Sales Rate$0.00 0.00%

$5,000.00 0.50% 0$10,000.00 1.00% $25.00 $20,000.00 2.00% $125.00 $30,000.00 3.00% $325.00 $50,000.00 6.00% $925.00

$100,000.00 10.00% $3,925.00

Commission from Previous Bracket

Page 46: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Use INDEX & MATCH to find how much to get to next bracketSales Amount To Get To Next Bracket

$37,500.00 $12,500.00

Commission Table

Sales Rate$0.00 0.00%

$5,000.00 0.50% 0$10,000.00 1.00% $25.00 $20,000.00 2.00% $125.00 $30,000.00 3.00% $325.00 $50,000.00 6.00% $925.00

$100,000.00 10.00% $3,925.00

Commission from Previous Bracket

Page 47: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Names Name Selected:SiouxDaveIsaac Random Number between 1 and 5Sue 4Luong F9 key evaluates or recalculates the whole sheet

Use INDEX and RANDBETWEEN to randomly select a name

Page 48: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Names Name Selected:Sioux SueDaveIsaac Random Number between 1 and 5Sue 2Luong F9 key evaluates or recalculates the whole sheet

Use INDEX and RANDBETWEEN to randomly select a name

Page 49: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Get First non-blank Array Formulas require Ctrl + Shift + Enter1 2 1 6

5 2 213 5 1

INDEX can handle array without Ctrl + Shift + Enter1 2 1 64 5 2 2

13 5 1

Page 50: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Get First non-blank Array Formulas require Ctrl + Shift + Enter1 1 2 1 65 5 2 2

13 13 5 1

INDEX can handle array without Ctrl + Shift + Enter1 1 2 1 65 5 2 2

13 13 5 1

Page 51: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Name ScoreStudent 1 85 3 3Student 2 99 1 1Student 3 99 2 2Student 4 45 5 5Student 5 19 7 7Student 6 27 6 6Student 7 85 4 4Student 8 0 8 8

Max Count99 2 Student 2 <== lookup name w max score, maybe duplicates

Student 3 See these for more detail:

No Large Count Name 1 Name 2 Name 31 99 2 Student 2 Student 3 852 85 2 Student 1 Student 7 993 45 1 Student 4 45

See these videos for more detail:

Use INDEX, MAX & MATCH to find student with max score

Lookup Name w Max Score

Excel Magic Trick 358: Part 1: Return Multiple Items From One Lookup Value ...Excel Magic Trick 359: Part 2: Return Multiple Items From One Lookup Value ...Excel Magic Trick 360: Part 3: Return Multiple Items From One Lookup Value ...

Excel Magic Trick 759: Array Formula To Sort List & Remove Duplicates - Dynamic Named Range Excel 2010 Magic Trick 672: AGGREGATE function Replaces SMALL Function Array Formula

Page 52: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Excel Magic Trick 358: Part 1: Return Multiple Items From One Lookup Value ...Excel Magic Trick 359: Part 2: Return Multiple Items From One Lookup Value ...Excel Magic Trick 360: Part 3: Return Multiple Items From One Lookup Value ...

Page 53: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Name ScoreStudent 1 85 3 3Student 2 99 1 1Student 3 99 2 2Student 4 45 5 5Student 5 19 7 7Student 6 27 6 6Student 7 85 4 4Student 8 0 8 8

Max Count99 2 Student 2 <== lookup name w max score, maybe duplicates

Student 3 See these for more detail:

No Large Count Name 1 Name 2 Name 31 99 2 Student 2 Student 3 852 85 2 Student 1 Student 7 993 45 1 Student 4 45

See these videos for more detail;

Use INDEX, MAX & MATCH to find student with max score

Lookup Name w Max Score

Excel Magic Trick 358: Part 1: Return Multiple Items From One Lookup Value ...Excel Magic Trick 359: Part 2: Return Multiple Items From One Lookup Value ...Excel Magic Trick 360: Part 3: Return Multiple Items From One Lookup Value ...

Excel Magic Trick 759: Array Formula To Sort List & Remove Duplicates - Dynamic Named Range Excel 2010 Magic Trick 672: AGGREGATE function Replaces SMALL Function Array Formula

Page 54: Excel Magic Trick 778 INDEX &Amp Exercise Sheet

Excel Magic Trick 358: Part 1: Return Multiple Items From One Lookup Value ...Excel Magic Trick 359: Part 2: Return Multiple Items From One Lookup Value ...Excel Magic Trick 360: Part 3: Return Multiple Items From One Lookup Value ...