[excel] Return Max Value of range that is determined by an Index & Match lookup

I need a cell to display the max value of a range who's row is defined by an index and match formula. I know this will be an array function but I'm struggling to get the syntax right. Here is what my data looks like. I have it laid out with Column Letters and Row Numbers like Excel.

Using the Table Below as reference, in a second table. When I enter b in cell A1 and y in column B1, the formula in cell C1 should return the value 35 because 35 is the maximum value in columns C:F on the row determined by A1 and B1 using INDEX and MATCH

Table 1.

     A      B      C     D     E     F
1    a      x      25    6     23    11
2    a      y      39    15    42    19
3    b      x      28    34    51    24
4    b      y      27    19    15    35
5    b      z      38    26    12    18
6    c      x      12    19    22    15

Now... What I want to do, is to create a formula that finds the max of columns C through F in the row that matches the values in A and B that are given in a separate table. For this example we will write the formula in cell C1. The formula should take the maximum of C through F based on a match of column A = b and column B = y (which the formula tells us is row 4). The value I want in this case would be 35 because it is the max of the 4 columns (C:F) on row 4.

This is what my second table should look like with the formula being in row C

Table 2.

     A      B      C
1    b      y      35
2    a      x      25
3    b      z      38
4    c      x      22

I tried this: (the formula is in table 2 so it is not explicitly declared in the match portion of the formula. You'll also have to be familiar with tables in excel to get it)

 =INDEX(MAX(Table1[C]:Table1[F]),MATCH([@A]&[@B],Table1[A]&Table1[B],0))

I then wrap it with Control + Shift + Enter to Array it.

The problem seems to come when I put the MAX function inside the array portion of the INDEX. Are there any ways around this? perhaps I should be using a completely different set of functions?

This question is related to excel excel-formula max excel-2010 excel-match

The answer is


You can easily change the match-type to 1 when you are looking for the greatest value or to -1 when looking for the smallest value.


Examples related to excel

Python: Pandas pd.read_excel giving ImportError: Install xlrd >= 0.9.0 for Excel support Converting unix time into date-time via excel How to increment a letter N times per iteration and store in an array? 'Microsoft.ACE.OLEDB.16.0' provider is not registered on the local machine. (System.Data) How to import an Excel file into SQL Server? Copy filtered data to another sheet using VBA Better way to find last used row Could pandas use column as index? Check if a value is in an array or not with Excel VBA How to sort dates from Oldest to Newest in Excel?

Examples related to excel-formula

Excel doesn't update value unless I hit Enter Referencing value in a closed Excel workbook using INDIRECT? Conditionally formatting cells if their value equals any value of another column Sum values from multiple rows using vlookup or index/match functions What does an exclamation mark before a cell reference mean? If two cells match, return value from third Excel - programm cells to change colour based on another cell Format numbers in thousands (K) in Excel Excel Formula which places date/time in cell when data is entered in another cell in the same row Excel formula to display ONLY month and year?

Examples related to max

Min and max value of input in angular4 application numpy max vs amax vs maximum mongodb how to get max value from collections Python find min max and average of a list (array) Max length UITextField How to find the highest value of a column in a data frame in R? MAX function in where clause mysql Check if all values in list are greater than a certain number How do I get the max and min values from a set of numbers entered? SQL: Group by minimum value in one field while selecting distinct rows

Examples related to excel-2010

Get list of Excel files in a folder using VBA filter out multiple criteria using excel vba Swap x and y axis without manually swapping values Excel 2010 VBA - Close file No Save without prompt Removing special characters VBA Excel Creating a list/array in excel using VBA to get a list of unique names in a column Excel formula to get week number in month (having Monday) Excel VBA Run-time Error '32809' - Trying to Understand it IF statement: how to leave cell blank if condition is false ("" does not work) Excel how to find values in 1 column exist in the range of values in another

Examples related to excel-match

If two cells match, return value from third Check if an excel cell exists on another worksheet in a column - and return the contents of a different column Comparing two columns, and returning a specific adjacent cell in Excel Return Max Value of range that is determined by an Index & Match lookup