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
ANDfunction verifies both conditions simultaneously: it checks if F2 is exactly "yes" and F3 is also exactly "yes". - If both conditions are satisfied, the
IFfunction returnsTRUE. For every other scenario—whether it's one "yes" and one "no", two "no"s, or even empty cells from incomplete QUERY results—it returnsFALSE, 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
相关产品推荐
相关产品推荐

