[英]Bulk Find and Replace from a Master List in Google Sheets
I have a spreadsheet in Google Sheets. 我在Google表格中有一个电子表格。 We currently pulled it from Ooyala to run QA. 我们目前将其从Ooyala撤出以进行质量检查。 We are trying to eliminate manual/human QA, and properly format many different values. 我们正在努力消除人工/人工质量检查,并正确设置许多不同的值的格式。 An example of a row is 行的一个示例是
Header Row
Hello
hello
Yes
yes
Bye
bye
Is there a way to write a script that targets a column, for example Header Row, and then finds and replaces an entire master list of values? 有没有一种方法可以编写以列为目标的脚本(例如“标题行”),然后查找并替换整个值的主列表? For example, somehow loading in a master doc that replaces all instances of hello with Hello and yes with Yes in one full swoop? 例如,以某种方式加载到主文档中,用一次Hello将所有Hello实例替换为Hello,将yes替换为yes? Would also be willing to try R or some other platform. 也愿意尝试R或其他平台。
If the example column is column A you can put in a free column: 如果示例列是A列,则可以放置一个自由列:
=ArrayFormula(IF(LEN(A2:A), UPPER(LEFT(A2:A,1)) & RIGHT(A2:A, LEN(A2:A) - 1), ""))
And then copy paste-values the resulting column into column A. 然后将结果列的粘贴值复制到列A中。
You can just combine the PROPER
function along with arrayformula and a condition to check for text: 您可以仅将PROPER
函数与arrayformula和条件进行组合以检查文本:
=ARRAYFORMULA(IF(ISTEXT(A:A),PROPER(A:A),))
or if you want the final list of values to be unique you can also do: 或者,如果您希望最终的值列表唯一,则可以执行以下操作:
=ARRAYFORMULA(UNIQUE(IF(ISTEXT(A:A),PROPER(A:A),)))
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.