简体   繁体   English

扩展 RegexMatch 以针对整个单元格范围进行测试 - Google Sheets

[英]Expand RegexMatch To Test Against An Entire Range Of Cells - Google Sheets

In Google Sheets, I'm trying to essentially make an address book which I then want to use as a means of working out who is associated with each row in my data spreadsheet.在 Google Sheets 中,我试图基本上制作一个地址簿,然后我想用它作为一种方法来确定谁与我的数据电子表格中的每一行相关联。

From looking around, I seemed to find that the best way to do the actual search would be to use the following formula环顾四周,我似乎发现进行实际搜索的最佳方法是使用以下公式

=ARRAYFORMULA(IF(REGEXMATCH($C$2:C, 'Address Book'!$A$2:A), 'Address Book'!$A$2:B ))

So my interpretation of this formula was that it is saying that for each row of column C, if it contains ANY of the values that are in Column A of the address book sheet, then show column A AND column B from the relevant row of the address book sheet.所以我对这个公式的解释是,对于 C 列的每一行,如果它包含地址簿表 A 列中的任何值,那么从相关行中显示 A 列和 B 列地址簿表。

However, I think the issue is actually that it is only looking at one row of the address book sheet as the formula only works if both the address book record and the data record use the same row number on their respective sheets.但是,我认为问题实际上是它只查看地址簿表的一行,因为该公式仅在地址簿记录和数据记录在其各自的表上使用相同的行号时才有效。 How can I expand this formula to make sure that it checks all of the values in column A of the address book sheet?如何扩展此公式以确保它检查地址簿表 A 列中的所有值?

EDIT: I realise I hadn't been clear on how the cells actually work.编辑:我意识到我还不清楚细胞的实际工作方式。 So for example, in column C of my data sheet, each cell would look something like the following:例如,在我的数据表的 C 列中,每个单元格将如下所示:

My Video Title - Joe Bloggs - ACME Co

And then in column A & B of my address book sheet, I then just have the names and emails listed which I then want to check against the above然后在我的地址簿表的 A 和 B 列中,我只列出了姓名和电子邮件,然后我想对照上述内容进行检查

Joe Bloggs  joebloggs@
Jon Smith   jonsmith@

So then I basically want to check if Joe Bloggs or Jon Smith or any other name in the address book sheet is in each row of Column C of my data sheet and if it is then get Column A AND B of the relevant row from the address book sheet那么我基本上想检查地址簿表中的 Joe Bloggs 或 Jon Smith 或任何其他名称是否在我的数据表的 C 列的每一行中,然后从地址中获取相关行的 A 列和 B 列书单

在第 2 行尝试:

=INDEX(IFNA(VLOOKUP(C2:C, Address Book'!A2:B, 2, 0)))

暂无
暂无

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

相关问题 写入Google表格中的单元格时出现错误的范围错误 - Incorrect Range Error when writing to cells in google sheets 使用Google表格中某个范围内的map()发出阅读单元格的问题 - Issues reading cells using map() in a range in Google Sheets Google Sheets - 根据相应单元格范围内的数值连接单元格范围内文本的公式 - Google Sheets - Formula to Concatenate Text in Range of Cells based on Numeric Value in Corresponding Range of Cells 是否有一个谷歌表格公式可以采用一系列单元格,并按字母顺序在一个单独的列中列出所有单元格? - Is there a Google Sheets formula that can take a range of cells, and list all the cells in one separate column, alphabetically? 仅从 Google 表格中的函数返回一系列单元格(在所需的索引范围内) - Return only a range of cells (within desired index range) from a function in Google Sheets Google 表格脚本,每个 function 与 && 运算符和设置值范围相结合以检查数组 - Google sheets script, Every function combined with && operator and setting range of values to check array against 如何编辑嵌套数组并将更改设置为 Google 表格中的一系列单元格? - How do I edit a nested array and set changes to a range of cells in Google Sheets? 检查数字是否在范围内 - Google 表格 - Check if number in range - Google sheets Google表格中一行中的数字范围 - Range of numbers in a row in Google Sheets Google表格切换单元格范围? - Google sheets switches cell range?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM