返回由 Index & 确定的范围的最大值匹配查找 [英] Return Max Value of range that is determined by an Index & Match lookup

查看:17
本文介绍了返回由 Index & 确定的范围的最大值匹配查找的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我需要一个单元格来显示由索引和匹配公式定义的行范围的最大值.我知道这将是一个数组函数,但我正在努力使语法正确.这是我的数据的样子.我用列字母和行号(如 Excel)对它进行了布局.

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.

在第二个表格中使用下表作为参考.当我在 A1 单元格中输入 bB1 列中的 y 时,单元格 C1<中的公式/code> 应该返回值 35 因为 35A1<确定的行上 C:F 列中的最大值/code> 和 B1 使用 INDEXMATCH

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

表 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

现在...我想要做的是创建一个公式,在与 CF 的行中找到与 C 匹配的列的最大值code>AB 在单独的表格中给出.对于此示例,我们将在单元格 C1 中编写公式.该公式应根据列 A = b 和列 B = yCF 的最大值code>(公式告诉我们的是第 4 行).在这种情况下,我想要的值是 35,因为它是 4 行上 4 列 (C:F) 的最大值.

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.

这是我的第二个表格的样子,公式在行 C

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

表 2.

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

我试过这个:(公式在表 2 中,所以它没有在公式的匹配部分明确声明.你还必须熟悉 excel 中的表格才能得到它)

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))

然后我用 Control + Shift + Enter 将它包装起来.

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

当我将MAX 函数放入INDEX 的数组部分时,问题似乎出现了.有没有办法解决这个问题?也许我应该使用一组完全不同的函数?

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?

推荐答案

您不需要索引匹配公式.您可以使用此数组公式.输入公式后,您必须按 CTL + SHIFT + ENTER.

You don't need an index match formula. You can use this array formula. You have to press CTL + SHIFT + ENTER after you enter the formula.

=MAX(IF((A1:A6=A10)*(B1:B6=B10),C1:F6))

快照

这篇关于返回由 Index &amp; 确定的范围的最大值匹配查找的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆