英文:
Why wouldn't this QUERY work when comparing multiple %'s in Google Sheets?
问题
The cells referenced contain 0,1
, 0,25
, 0,5
, 0,75
, and the column T
where their data sits also contains 0,1
, 0,25
, 0,5
, 0,75
, which appear identical, but no results are returned. I'm wondering what I might be missing here.
=QUERY(Dados!A1:V, "select A, B, E, L, ' ', M, N, O, G, F, P, Q, R, T, I, J where T matches '"&G5&"|"&H5&"|"&J5&"|"&K5&"|"&L5&"|"&M5&"|"&N5&"' label ' ' ' '")
英文:
The cells referenced contain 0,1
, 0,25
, 0,5
, 0,75
and the column T
where there data sits do have 0,1
, 0,25
, 0,5
, 0,75
, which look identical, but nothing gets returned and I wonder what I may be missing here.
=QUERY(Dados!A1:V;"select A, B, E, L, ' ', M, N, O, G, F, P, Q, R, T, I, J where T matches '"&G5&"|"&H5&"|"&J5&"|"&K5&"|"&L5&"|"&M5&"|"&N5&"' label ' ' ' '")
Here is the practical example: https://docs.google.com/spreadsheets/d/1gh5w0czg2JuoA3i5wPu8_eOpC4Q4TXIRhmUrg53nKMU/edit?usp=sharing
答案1
得分: 2
这里是使用filter()
和无辅助单元格
的替代方法
=filter(J:K;xmatch(K:K;filter(B1:H1;B2:H2)))
英文:
Here's an alternate approach using filter()
and no helper cells
=filter(J:K;xmatch(K:K;filter(B1:H1;B2:H2)))
答案2
得分: 1
你的 QUERY 公式是正确的。这里的关键概念是:“...看起来相同...”。我认为(因为没有提供实际数据),要么你的列 T
中的数据,要么第 5
行中的数据是经过格式化为 2 位小数的计算结果。
如果是这种情况,0.25
不等于 0.25000001
。一旦格式化,它们可能看起来相同,但实际上不同。
如果不是这种情况,请分享一个测试表格。
英文:
Your QUERY formula is correct. The key notion here is: "...which look identical...".
I believe (since no actual data has been provided) that either your data in column T
or in row 5
are results of calculations formatted to 2 decimals.
If this is the case, 0,25
is NOT equal/the same as 0,25000001
. Once formatted they may look the same but are not.
If this is not the case, please share a test sheet.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论