如果查询中的语句
我正在使用查询&像这样的Ingortrange组合:
=IFERROR(QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1EizWsVwZfUy1NDRwmmWEpj2OxTGvBjP9-YBbds9xmr0/edit#gid=0", "'Locations'!A2:C"), "select Col3 where Col1='"&J4&"' and Col1<>''"))
但是,我希望它返回相关值:
col3如果值在col1中
col7如果值在col5中
Col11如果该值在Col9中
如果该值在一个以上的位置,则可能会丢弃错误,或者在第一次出现时返回结果,无论哪种方式都可以。
我正在尝试在查询中使用“ countif”来做到这一点,但没有很多运气。
I'm using a query & importrange combo like this:
=IFERROR(QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1EizWsVwZfUy1NDRwmmWEpj2OxTGvBjP9-YBbds9xmr0/edit#gid=0", "'Locations'!A2:C"), "select Col3 where Col1='"&J4&"' and Col1<>''"))
But Instead of just searching column 1 and returning the associated value in column 3, I would like it to return the associated value in:
Col3 if the value is in Col1
Col7 if the value is in Col5
Col11 if the value is in Col9
It can throw an error if the value is in more than one place, or return the result at the first occurrence, either way is fine.
I'm trying to do this using "countif" within the query but am not having a much luck.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
尝试:
try: