Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/google-sheets/3.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google sheets 最后,;谷歌电子表格中一个月的第一天_Google Sheets_Formula_Worksheet Function - Fatal编程技术网

Google sheets 最后,;谷歌电子表格中一个月的第一天

Google sheets 最后,;谷歌电子表格中一个月的第一天,google-sheets,formula,worksheet-function,Google Sheets,Formula,Worksheet Function,如何在谷歌电子表格中获得上个月的第一天和最后一天?我尝试了几种方法来解决这个问题,但没有成功。如果您的基准日期在A1, 以下公式适用于上个月的第一天: =date(year(A1),month(A1)-1,1) =eomonth(A1,-1) 查找上个月的最后一天更为简单: =date(year(A1),month(A1)-1,1) =eomonth(A1,-1) 使用=eomonth((eomonth(today(),0)),-2)+1,以便从今天开始使用上一个 对于上个月的最后一天,

如何在谷歌电子表格中获得上个月的第一天和最后一天?我尝试了几种方法来解决这个问题,但没有成功。

如果您的基准日期在
A1

以下公式适用于上个月的第一天:

=date(year(A1),month(A1)-1,1)
=eomonth(A1,-1)
查找上个月的最后一天更为简单:

=date(year(A1),month(A1)-1,1)
=eomonth(A1,-1)
使用
=eomonth((eomonth(today(),0)),-2)+1
,以便从今天开始使用上一个


对于上个月的最后一天,使用
=eomonth((eomonth(today(),0)),-1)
作为上个月的最后一天(国际)


上个月的最后一天(美国)

上个月的第一天(国际)

上个月的第一天(美国)

演示:

单元格A1包含:

=eomonth(A2,-1)+1
=Eomonth(now(),)
单元格A2包含:

=eomonth(A2,-1)+1
=Eomonth(now(),)

如果不使用“now()”,您可以输入另一个单元格引用,甚至可以从不同的工作表中对特定单元格进行查询/导入,使这些日期更加动态。

感谢您的提供,不幸的是,它无法工作。也许是因为我用的是法语版本?对我来说,即使我是法国人,公式也必须是英文的,但可能在几周前就改变了……好吧,它能工作=>=日期(年(A1),月(A1)-1,1)谢谢你,ZygdAnd,感谢你在下一个月的第一天(以及随后的几个月):
=日期(年(A1),月(A1)+1,1)
非常感谢它的工作