只有星期二和星期五重复

时间:2015-06-19 21:53:05

标签: google-sheets

是否有可能在Google表格中重复周二和周五的重复模式?我正在寻找的输出类型是:

  

2015年6月2日星期二
  2015年6月5日星期五
  2015年6月9日,星期二
  2015年6月12日星期五
  ...

然后向下拖动以继续模式... 当我现在这样做时,它会继续增加星期二到星期五之间的天数。

谢谢!

1 个答案:

答案 0 :(得分:0)

Maybe you can try a formula:

=query(ArrayFormula({(date(2015,6,2)+row(A1:A1000)-1), weekday(date(2015,6,2)+row(A1:A1000)-1,2)}), "select Col1 where Col2 matches '"&JOIN("|", 2, 5)&"' limit 10")

where the date() function holds the starting date and the limit part limits the output to whatever number you want. See if that works ?

EDIT: If you only want the tuesdays and fridays from the list of dates in col A, try:

=filter(A2:A, (WEEKDAY(A2:A)=3)+(WEEKDAY(A2:A)=6)) 

Then copy the output and paste in col A as 'values only'.