All about Visual Basic for Application (VBA) especially for Microsoft Excel.


  • Subscribe

How to use index function, match function and max function in excel?

Posted by | October 8, 2012 .

Actually in Microsoft Excel we have these 2 function index and match when combined it become very powerful formula even better than vlookup function. To understand this formula may beĀ  difficult at the first place but when we use to it sooner or later it become normal. This tutorial actually for me to remember how it work but if you feel useful too then much better. When I try to use vlookup function but fail because data position at reverse side, that why I’m trying to look for other alternative. So, I found this function when Google for solution.

To make the scenario more simple and easy to understand. Let try example below:

  1. In Column B3 to B8 – Just numbering 1,2,3,….
  2. In Column C3 to C8 we have fruit name
  3. In Column D3 to D8 we have quantity

This quantity keep on changing. What we want here is, the Maximum fruit that having the highest quantity. Forget about Visual Basic for Application just use formula. Let say we want the result in F3. Try this formula and insert into Cell F3:


The explanation refer below picture.

This definition I get from help for Index function the equation as below:

Array is a range of cells or an array constant.

  • If array contains only one row or column, the corresponding row_num or column_num argument is optional.
  • If array has more than one row and more than one column, and only row_num or column_num is used, INDEX returns an array of the entire row or column in array.

Row_num selects the row in array from which to return a value. If row_num is omitted, column_num is required.
Column_num selects the column in array from which to return a value. If column_num is omitted, row_num is required.

and for Match equation as below:

Lookup_value is the value you use to find the value you want in a table.

  • Lookup_value is the value you want to match in lookup_array. For example, when you look up someone’s number in a telephone book, you are using the person’s name as the lookup value, but the telephone number is the value you want.
  • Lookup_value can be a value (number, text, or logical value) or a cell reference to a number, text, or logical value.

Lookup_array is a contiguous range of cells containing possible lookup values. Lookup_array must be an array or an array reference.
Match_type is the number -1, 0, or 1. Match_type specifies how Microsoft Excel matches lookup_value with values in lookup_array.

  • If match_type is 1, MATCH finds the largest value that is less than or equal to lookup_value. Lookup_array must be placed in ascending order: …-2, -1, 0, 1, 2, …, A-Z, FALSE, TRUE.
  • If match_type is 0, MATCH finds the first value that is exactly equal to lookup_value. Lookup_array can be in any order.
  • If match_type is -1, MATCH finds the smallest value that is greater than or equal to lookup_value. Lookup_array must be placed in descending order: TRUE, FALSE, Z-A, …2, 1, 0, -1, -2, …, and so on.
  • If match_type is omitted, it is assumed to be 1.

If you have any question or project please e-mail to me, I will reply and create for free depending on my free time.
Click Here to E-mail
Click here to get your project done with 5 Dollar

Share Button
Share on Facebook
Bookmark this on Digg
Bookmark this on Yahoo Bookmark
Bookmark this on Google Bookmarks
Bookmark this on Delicious

Leave a Comment

If you would like to make a comment, please fill out the form below.

Name (required)

Email (required)