这是我的google脚本:https://docs.google.com/spreadsheets/d/1A0zEN4zczP7aYn2aHdFjDxYgDJBi7R3S6NY_MTcM7YA/edit?usp=sharing
它的工作原理:在我的单子里有生产计划。E列仅用于帮助计算C列中使用的索引的日期(3M 000 000000等于3M job_no年)。在单元格E2的顶部,用于生成下一个作业索引的is函数在按(+)按钮后由脚本生成。
我想要得到的是:如果C列中的索引(3Mxxxxxxxx)被复制,E列中的单元格将从C列中计算数据或显示值"123456789“。我想在单元格C2中获得“索引3M xxx xxxx是复制的,请删除重复项”。
问题是:我使用countif函数检查重复项:=countif(E5:E;"=123456789"),当我在bar中写入这个函数时,它显示了很好的值(2),但是如果我单击enter,它在单元格(i8)中一直显示为0。同样的问题是vlookup函数搜索C列中重复值的索引和名称。我想问题是在E5:E单元格里面有if公式。
请帮我处理一下。
发布于 2022-02-03 12:08:39
若要检测C列中的重复项,请使用此公式
=if(arrayformula(sum(--(if(C8:C="";;countif(left(C8:C;14);left(C8:C;14)))>1)))>0;"Index 3M xxx xx xxxx is duplicated. Please remove duplicates";)还有细节..。
=if(arrayformula(sum(--(if(C8:C="";;countif(left(C8:C;14);left(C8:C;14)))>1)))>0;"Index """
&textjoin(", ";;unique(query({C8:C\arrayformula(countif(left(C8:C;14);left(C8:C;14)))};"select Col1 where Col1 is not null and Col2>1";0)))&
""" is/are duplicated. Please remove duplicates";)只有代码(14个字符)
=if(arrayformula(sum(--(if(C8:C="";;countif(left(C8:C;14);left(C8:C;14)))>1)))>0;"Index """
&textjoin(", ";;unique(query({arrayformula(left(C8:C;14))\arrayformula(countif(left(C8:C;14);left(C8:C;14)))};"select Col1 where Col1 is not null and Col2>1";0)))&
""" is/are duplicated. Please remove duplicates";)

https://stackoverflow.com/questions/70970668
复制相似问题