简体   繁体   English

Google Apps脚本:查找具有特定值的单元格,然后设置其背景色

[英]Google Apps Script: Find Cells With a Certain Value, Then Set the Background Color of It

I am familiar with JavaScript, but I am new to Google Apps Script. 我熟悉JavaScript,但是我是Google Apps脚本的新手。

My goal is to search through the whole sheet, find all the "foo"s and change the cell background color to red, then find all the "bar"s and change the cell background color to blue. 我的目标是搜索整个工作表,找到所有“ foo”并将单元格背景色更改为红色,然后找到所有“ bar”并将单元格背景色更改为蓝色。 To see an example, this a link . 要查看示例,请点击链接

I would rather put a picture, but I cannot. 我宁愿拍张照片,但我不能。

I was stuck on this problem for a long time. 我在这个问题上停留了很长时间。 Any help would mean a lot. 任何帮助都将非常重要。 Thank you! 谢谢!

Speadsheets内置了非常好的条件格式。https://support.google.com/docs/answer/78413?hl=zh_CN

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

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM