在Excel中插入周列

问题描述 投票:0回答:1

我有一个excel列,有一天。

我想添加另一个列,它将提取当天的周(周一至周日),并将其显示为该周日日期结束的一周。

     Day        
4/20/2019   
4/21/2019   
4/22/2019   
4/23/2019   
4/24/2019   
4/25/2019   

预期产出

      Day        Week
4/20/2019   4/21/2019
4/21/2019   4/21/2019
4/22/2019   4/28/2019
4/23/2019   4/28/2019
4/24/2019   4/28/2019
4/25/2019   4/28/2019

有谁知道如何使用excel函数添加此列?

excel date weekday
1个回答
3
投票

带有第二个参数为2的WEEKDAY给出了一周中1到7之间的数字(7表示星期日)。您可以添加日期,直到该数字变为7的天数,换句话说:

=A2+(7-WEEKDAY(A2,2))

enter image description here

© www.soinside.com 2019 - 2024. All rights reserved.