简体   繁体   English

如何使用谷歌表格转置一组与特定输入日期相对应的单元格?

[英]How to use google sheets to transpose a set of cells that correspond to a specific input date?

I am trying to set up a calendar-type to-do list on google sheets.我正在尝试在谷歌表格上设置一个日历类型的待办事项列表。 I would like to be able to take a date from a certain cell on sheet 1, and use it to match up to a to-do list from another sheet (sheet 2) that corresponds with the same date that's at the top of the column, then transpose the data from sheet 2 onto sheet 1. Should I try to use a transpose function?我希望能够从工作表 1 上的某个单元格中获取日期,并使用它来匹配另一个工作表(工作表 2)中的待办事项列表,该工作表与列顶部的相同日期相对应,然后将表 2 中的数据转置到表 1。我应该尝试使用转置 function 吗? Hlookup?查找?

query function would work well: query function 会很好用:

=query(Sheet1:A,D,"select * where A = date '"&text(G1,"yyyy-mm-dd")&"' order by B,C,D ",1)

在此处输入图像描述

For ease, I've shown it on the same sheet.为方便起见,我在同一张纸上展示了它。

More about query :更多关于query

https://developers.google.com/chart/interactive/docs/querylanguage#language-clauses https://developers.google.com/chart/interactive/docs/querylanguage#language-clauses

Some alternatives:一些替代方案:

=query(transpose(Sheet1:1,4),"select * where Col1 = date '"&text(A7,"yyyy-mm-dd")&"' order by Col2 ",1)

在此处输入图像描述

=transpose(query(transpose(Sheet1:1,4),"select * where Col1 = date '"&text(A7,"yyyy-mm-dd")&"' order by Col2 ",1))

在此处输入图像描述

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM