You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Google Sheets:基于QUERY双结果的True/False条件判断需求

Solution for Your Boolean Check Formula

Hey there! I've got a straightforward fix for your formula requirement. Since your QUERY function outputs two results in cells F2 and F3, we can combine AND and IF functions to get the exact True/False outcome you need.

The Formula to Implement

Just paste this into the cell where you want the final result (like F4 or any empty cell):

=IF(AND(F2="yes", F3="yes"), TRUE, FALSE)

How It Works

  • The AND function verifies both conditions simultaneously: it checks if F2 is exactly "yes" and F3 is also exactly "yes".
  • If both conditions are satisfied, the IF function returns TRUE. For every other scenario—whether it's one "yes" and one "no", two "no"s, or even empty cells from incomplete QUERY results—it returns FALSE, which aligns perfectly with your needs.

Quick Edge Case Note

If your QUERY sometimes returns fewer than two results (leaving F3 blank), this formula still behaves correctly. A blank cell doesn't equal "yes", so the AND check fails and returns FALSE—which makes sense, since you require both outputs to be "yes" to get a TRUE.

内容的提问来源于stack exchange,提问作者Elizabeth

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 16:22:51