Excel公式,返回特定名称的行和特定列交叉处的单元格值是什么?

huangapple go评论53阅读模式
英文:

Excel formula which returns the cell value for the intersection of rows with specific name and specific column?

问题

有没有一种Microsoft Excel公式,可以返回位于特定列中的最后一个单元格的值,并与给定名称的行交叉?

英文:

Is there a Microsoft Excel formula which returns a cell value for the last cell that is located in a specific column and in the same time intersects rows with a given name?

答案1

得分: 2

使用Office 365,我们可以筛选范围并返回满足条件的所有数据的数组。然后使用TAKE函数获取最后一个:

=TAKE(FILTER(H:H,((A:A=<row_name>)*(H:H<>"")),1)

另一个选项适用于2010年之后的所有版本,它利用AGGREGATE函数的能力来处理数组并忽略由于除以0而引起的任何错误。其中的14表示获取在(A:A=<row_name>)*(H:H<>"")返回1的情况下最大的行号,然后将该行号传递给INDEX函数:

=INDEX(H:H,AGGREGATE(14,7,ROW(H:H)/((A:A=<row_name>)*(H:H<>"")),1)
英文:

With Office 365, We can filter the range and return an array of all that meet the criteria. Then use TAKE to grab the last one:

=TAKE(FILTER(H:H,((A:A=&lt;row_name&gt;)*(H:H&lt;&gt;&quot;&quot;),&quot;&quot;),-1)

Another option that works in all Versions after 2010 This uses AGGREGATES ability to work with arrays and ignore any errors cause by dividing by 0. The 14 grabs the largest row number where the (A:A=&lt;row_name&gt;)*(H:H&lt;&gt;&quot;&quot;) returns a 1. It then passes that row number to the INDEX:

=INDEX(H:H,AGGREGATE(14,7,ROW(H:H)/((A:A=&lt;row_name&gt;)*(H:H&lt;&gt;&quot;&quot;)),1))

答案2

得分: 0

以下是翻译好的部分:

通用公式表达式:

=LOOKUP(2,1/(<row_header_range>=<string_value>)*(<column_range><>""),<column_range>)

示例(在乌克兰语环境中,, 被替换为 ;):

=LOOKUP(2;1/((A:A="Row_name")*(H:H<>""));H:H))

LOOKUP 函数根据指定的搜索条件,搜索列中的最后一个非空单元格。

英文:

Generic formula expression:

=LOOKUP(2,1/(&lt;row_header_range&gt;=&lt;string_value&gt;)*(&lt;column_range&gt;&lt;&gt;&quot;&quot;),&lt;column_range&gt;)

and the example (in Ukrainian locale, where , is replaced by ;:

=LOOKUP(2;1/((A:A=&quot;Row_name&quot;)*(H:H&lt;&gt;&quot;&quot;));H:H))

LOOKUP function searches for the last non-empty cell in the column, based on the specified search criteria.

huangapple
  • 本文由 发表于 2023年3月4日 02:21:34
  • 转载请务必保留本文链接:https://go.coder-hub.com/75630605.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定