简体   繁体   English

Google Sheets ArrayFormula 比较不同行的多个单元格

[英]Google Sheets ArrayFormula to Compare Multiple Cells from Different Rows

I'm making a checklist of Disney Blu-rays.我正在制作迪士尼蓝光清单。 Some Disney movies are available in 4K but some are not.有些迪斯尼电影有 4K 格式,但有些则没有。 I'm trying to create a column that will show if a movie release is available in a higher quality than the entry for that row.我正在尝试创建一个列,该列将显示电影版本的质量是否高于该行的条目。

Here is a simplified test sheet that should hopefully make my goal more clear... https://docs.google.com/spreadsheets/d/1L2-npiEdTE9ardDi2q38sYhkKRFKAPCu_gtJFbOZa80/edit?usp=sharing这是一个简化的测试表,希望能让我的目标更加清晰...... https://docs.google.com/spreadsheets/d/1L2-npiEdTE9ardDi2q38sYhkKRFKAPCu_gtJFbOZa80/edit?usp=sharing

I've found a ton of ways to compare rows, look for duplicates, etc. But despite my limited but best efforts, I can't find a way to combine what I've found in a way that works towards this goal.我已经找到了很多方法来比较行、查找重复项等。但是尽管我付出了有限但最大的努力,但我找不到一种方法来结合我发现的方法来实现这个目标。 The best I've been able to do is find duplicate titles but I've not been able to compare that against the Original Theatrical Release Year, and Blu-ray vs 4K release columns.我能做的最好的事情就是找到重复的标题,但我无法将其与原始戏剧发行年份以及蓝光与 4K 发行专栏进行比较。

I'd like to do this through an ArrayFormula so that any rows I add are easily and automatically rendered into the formula without any extra work.我想通过 ArrayFormula 来执行此操作,这样我添加的任何行都可以轻松自动地呈现到公式中,而无需任何额外的工作。 Any help would be greatly appreciated.任何帮助将不胜感激。 Thank you.谢谢你。

Here's my take on this:这是我对此的看法:

=ArrayFormula(IFS(A3:A="",,COUNTIFS(A3:A,A3:A,B3:B,B3:B,D3:D,"4K",ROW(A3:A),">"&ROW(A3:A))*(D3:D<>"4K"),"Yes",1,"No"))

I'm not sure if I fully understood the task but the above formula seems to give the correct result.我不确定我是否完全理解该任务,但上面的公式似乎给出了正确的结果。

try:尝试:

=INDEX(LAMBDA(a, b, c, d, LAMBDA(x, IF(a="",,
 IF(IFERROR(x, "No")="No", "Yes", "No")))(VLOOKUP(a&d, 
 {FILTER(FILTER(a&d, b), NOT(COUNTIF(FILTER(a, c), FILTER(a, b)))); 
  FILTER(FILTER(a&d, c),     COUNTIF(FILTER(a, b), FILTER(a, c)))}, 1, )))
 (A3:A&B3:B, C3:C="Blu-ray", D3:D="4K", ROW(B3:B)))

在此处输入图像描述

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

相关问题 如何为 Google 表格上的多个单元格应用 Arrayformula,其中包括固定单元格和可变单元格? - How can I apply an Arrayformula for multiple cells on Google Sheets which includes fixed and variable cells? 谷歌表格 ARRAYFORMULA 跳过空白行 - Google Sheets ARRAYFORMULA to skip blank rows 带有 IF Google Sheets 的 ArrayFormula - ArrayFormula with IF Google Sheets Google Sheets ARRAYFORMULA 计算满足条件的前一行 - Google Sheets ARRAYFORMULA count preceeding rows that meet condition 在 Arrayformula 中使用工作日的 Google 表格 - Google Sheets Using Weekday in an Arrayformula Google Sheets Arrayformula 与所有行的某种连接/文本连接/类似的东西 - Google Sheets Arrayformula with some sort of concatenate/textjoin/something similar for all rows 如何比较谷歌表格中的两个公式(计算)单元格 - How to compare two formula (calculated) cells in Google Sheets 这个公式可以用在 Google Sheets 的 ARRAYFORMULA 中吗? - Can this formula be used in an ARRAYFORMULA in Google Sheets? 将 ArrayFormula 与 IF 结合使用的 Google Sheets 公式存在问题 - Having issues with Google Sheets formula combing ArrayFormula with IF 使用arrayformula的Google表格VLOOKUP无法正常工作 - Google Sheets VLOOKUP using arrayformula not working
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM