我正在尝试根据单元格值查询结果,似乎包含条件导致解析错误。我在做什么错了?
查询:
=QUERY(Company_overview!A2:L,"SELECT * WHERE B CONTAINS "&B3&" AND L >= datetime '"&TEXT(today()-B4,"yyyy-MM-dd HH:mm:ss")&"' AND L <= datetime '"&TEXT(NOW(),"yyyy-MM-dd HH:mm:ss")&"' ")")"
图片:
答案 0 :(得分:0)
我最终找到了正确查询的答案:
=QUERY(Company_overview!A2:L,"SELECT * WHERE B='"&B3&"' AND L >= datetime '"&TEXT(today()-B4,"yyyy-MM-dd HH:mm:ss")&"' AND L <= datetime '"&TEXT(NOW(),"yyyy-MM-dd HH:mm:ss")&"' ")