我无法使用“ Google Query”提取正确的数据,请建议我如何解决。
我的价值是错误的。
链接到电子表格:。
QUERY = query(a1:f5,“选择d where d ='d167'和c ='c168',1)
请参阅绿色单元格,
我得到的答案是“分析师”,它在d1中是
我期望的答案是D2中的“ 30”
I cannot pull correct data using "GOOGLE Query" please advise how I can resolve it.
I am getting wrong value instead.
Link to Spreadsheet: https://docs.google.com/.../1D.../edit...
Query =QUERY(A1:F5,"SELECT D WHERE D='D167' and C='C168'",1)
Please refer to Green Cell
The answer I am getting is " Analyst" which is in D1
The answer I am expecting is "30" which is in D2
发布评论
评论(1)
您必须更改这些引用的方式,但是如果D167是一个数字,请使用
”& d167&“
,但是如果其文本,请使用'“”& d167&'''''
。如果您在D中查找“分析师”,则将使用'“”& d167&“'
现在,您的查询正在寻找d167和c168的文字值,而不是细胞引用。
You'll have to change how these references are, but if D167 is a number, use
"&D167&"
, but if its text, use'"&D167&"'
. If you were looking up 'Analyst' in D, you'd use'"&D167&"'
As it sits right now, your QUERY is looking for the literal values of D167 and C168 and not the cell references.