问题描述
我在一个Google文档中有多个电子表格,并且我试图在条件公式中使用一个电子表格中的信息.例如,如果文档包含两个电子表格(sheet_A和sheet_B),则我试图创建一个条件公式,以便如果sheet_A单元格A2中有文本,则sheet_B单元格A2会填充某种颜色.
I have multiple spreadsheets in a single google doc and I am trying to use information from one spread sheet in a conditional formula. For example, if the document contained two spreadsheets (sheet_A and sheet_B), I am trying to create a conditional formula such that if there is text in sheet_A cell A2, then sheet_B cell A2 fills a certain color.
我尝试了应用于范围= B2"并创建一个自定义公式= sheet_A!A2<>".但是,我不断收到错误消息,说这是一个无效的公式.我可以使用= sheet_A!A2从另一张图纸中提取值,而公式= A2<>"适用于条件格式以更改同一张图纸中的颜色,我似乎无法让这两个函数起作用在一起.
I have tried Apply to range = B2 and creating a custom formula =sheet_A!A2<>"". However, I keep getting an error that this is an invalid formula. I can use =sheet_A!A2 to pull the value from the other sheet and the formula =A2<>"" works for conditional formatting to change the color within the same sheet, I just can't seem to get these two functions to act together.
非常感谢您对我在这里做错的任何想法.
Many thanks for any thoughts on what I am doing wrong here.
推荐答案
出于某种原因,条件格式需要INDIRECT函数.
For some reason conditional formatting requires the INDIRECT function.
尝试将此作为您的自定义公式:
Try this as your custom formula:
= INDIRECT("sheet_A!A2")<>"
这篇关于如何在Google文档的条件公式中引用另一个工作表中的数据的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!