简体   繁体   English

在 Google 表格中,当您知道查找列名称和结果列名称时,如何在一行的列中找到值?

[英]In Google Sheets, how can I find the value in a column of a row when you know the lookup column name and result column name?

I have a Sheet1 with data like this:我有一个包含如下数据的Sheet1

one two three four
a一种 b b c c d d
e电子 f F g G h H
i一世 j j k k l
m n n o o p p

I have Sheet2 with data like this:我有Sheet2的数据是这样的:

alpha α value价值
c c
k k
g G
c c

For each row in Sheet2 , I want to look up Sheet2 .对于Sheet2中的每一行,我想查找Sheet2 alpha in Sheet1 . Sheet1alpha three and return the value of Sheet1 . three并返回Sheet1的值。 one . one I want to do this by putting an array formula in B2 .我想通过在B2中放置一个数组公式来做到这一点。

So, the expected result is:所以,预期的结果是:

alpha α value价值
c c a一种
k k i一世
g G e电子
c c a一种

I can use the new Google Sheet formulas they just released -- except named ranges.我可以使用他们刚刚发布的新 Google 表格公式——命名范围除外。 I feel like there is some clever trick using them, but I can't come up with it.我觉得使用它们有一些巧妙的技巧,但我想不出来。

BYROW() and XLOOKUP() are your friend in this case. BYROW()XLOOKUP()在这种情况下是你的朋友。

=BYROW(A2:INDEX(A2:A,COUNTA(A2:A)),LAMBDA(x,XLOOKUP(x,Sheet1!C2:C,Sheet1!A2:A,"Not Found")))

在此处输入图像描述

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 谷歌表格中的反向查找以返回列名 - Inverse LOOKUP in google sheets to return column name 我可以在 google 表格中将列命名为变量吗? - Can I name a column a variable in google sheets? 您如何在 Google 表格的 A 列中找到最后使用的行 - How do you find the last used row in column A of Google Sheets (谷歌表格或excel)如何在当前单元格上方找到最接近的匹配值,并在同一行中返回不同的列? - (google sheets or excel) How can I find the closest matching value above the current cell, and return a different column in that same row? 在 Google 表格中,如何将基于特定列值的行复制到新选项卡中,然后将 append 复选框复制到该行? - In Google Sheets, how can I copy a row based on a specific column value into a new tab, and then append checkboxes to the row? 搜索特定列,然后根据名称查找匹配行的值 - search for a specific Column and then lookup the value of the matching row based off a name 如何动态填充 Google 表格中从一行中生成最小日期值的列? - How can I dynamically fill a column in Google Sheets that is producing the smallest date value from a row? 在 Google 表格中的列中查找单词的频率,并使用公式从不同的列中查找另一个值 - Find frequency of words in a column in Google Sheets and lookup another value from a different column using formulae 在 Google Scripts 中按名称获取 Google 表格列 - Get Google sheets column by name in Google Scripts 你能隐藏基于谷歌表格中单元格值的列吗? - Can you hide a column based on a cell value in google sheets?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM