高级Excel查找函数

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

Advance Excel Lookup function

问题

我想使用查找功能来查找特定值,如果该值不存在,它需要查找其他列。

如果金额存在于Amount1列中,它需要选择它...否则它需要从amount2列中选择金额。

输出列应该将所有值放在单个列中。

英文:

I wanted to use lookup function to lookup for specific value and if the value doesn't exist, it needs to lookup other column.

If the amount is present in Amount1 column it needs to pick it up ..else it needs to pick the amount from amount2 column.

高级Excel查找函数

Output column should have all the values in single column

答案1

得分: 2

尝试使用 BYROW()隐式交集 运算符 @

=BYROW(F2:F6, LAMBDA(x, @TOROW(FILTER(B2:D6, x = A2:A6, ""))))

或者,尝试按照 JvdV 先生提到的方法,使用 MMULT()

• 公式在单元格 H2 中使用

=MMULT(B2:D6*1, {1;1;1})

英文:

Try using BYROW() with an implicit intersection operator @

高级Excel查找函数


=BYROW(F2:F6,LAMBDA(x,@TOROW(FILTER(B2:D6,x=A2:A6,""),1)))

Or, try as mentioned by JvdV Sir, using MMULT()

高级Excel查找函数


• Formula used in cell H2

=MMULT(B2:D6*1,{1;1;1})

答案2

得分: 1

使用嵌套的 XLOOKUP()。尝试-

=XLOOKUP(1,XLOOKUP(G2,$A$2:$A$6,$B$2:$D$6),XLOOKUP(G2,$A$2:$A$6,$B$2:$D$6),,1)
英文:

Use nested XLOOKUP(). Try-

=XLOOKUP(1,XLOOKUP(G2,$A$2:$A$6,$B$2:$D$6),XLOOKUP(G2,$A$2:$A$6,$B$2:$D$6),,1)

高级Excel查找函数

答案3

得分: 1

也许可以考虑另一种方法:

使用辅助列获取每行的最大值,然后使用匹配进行索引。

然后可以是这些值的平均值或最小值等等。

还要注意输入的顺序不需要匹配输出的顺序。

英文:

Well, perhaps another method to consider:

Use a helper column to get the max value for each row then index with match:

高级Excel查找函数

Then it could be the average of the values or the minimum etc etc

Also note that the order of the input does not need to match the order of the output.

答案4

得分: 1

=SUM(FILTER($B$2:$D$11,$A$2:$A$11=$F2,""))

=LET(sl,A2:A11,sr,B2:D11,dl,F2:F6,
BYROW(dl,LAMBDA(r,SUM(FILTER(sr,sl=r,""))))

=SUM(FILTER(Table1[[Amt1]:[Amt3]],Table1[Fruit]=[@Fruit],""))

英文:

Sum Up Rows of Filtered Data

In cell G2:

Basic (Copy Down)

=SUM(FILTER($B$2:$D$11,$A$2:$A$11=$F2,""))

高级Excel查找函数

Dynamic (Spills)

=LET(sl,A2:A11,sr,B2:D11,dl,F2:F6,
BYROW(dl,LAMBDA(r,SUM(FILTER(sr,sl=r,"")))))

Excel (Structured) Table

高级Excel查找函数

In the first cell (row) of the Amount column:

=SUM(FILTER(Table1[[Amt1]:[Amt3]],Table1[Fruit]=[@Fruit],""))

The remaining cells (rows) get populated automatically.

huangapple
  • 本文由 发表于 2023年6月22日 14:00:58
  • 转载请务必保留本文链接:https://go.coder-hub.com/76528959.html
匿名

发表评论

匿名网友

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

确定