在两个给定日期之间每隔两天自动填充一次 [英] Auto-populate every second day between two given dates
本文介绍了在两个给定日期之间每隔两天自动填充一次的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
I'm currently using the formula in this article to auto-populate a column of dates between to given dates:
=ArrayFormula(TO_DATE(row(indirect("A"&A2):indirect("A"&B2))))
如何调整公式以提供每个秒日期?然后,文章中的D列将显示:
How can I tweak the formula to give every second date? Column D in the article would then say:
- 2018年1月4日
- 2018年3月4日
- 2018年5月4日
- 2018年7月4日...依此类推.
推荐答案
如果开始日期为奇数日期,则该公式似乎跳过了一天.这可以纠正吗?
It seems like the formula skips a day if the start date is an odd date. Can this be corrected?
=ARRAYFORMULA(FILTER(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2))),
MOD(ROW(INDIRECT("A1:A"&COUNTA(TO_DATE(ROW(INDIRECT("A"&A2):INDIRECT("B"&B2)))))), 2)))
这篇关于在两个给定日期之间每隔两天自动填充一次的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文