简体   繁体   中英

Grouping date based on week | Excel

List Image

列表图像

Result That I Hope

我希望的结果

I need to figure how to group list of date.

Date Formula : "mm/dd/yyyy"

i've tried using : 1. =A1 + 7 . it returns 43113 2. =A1 + WEEKDAY(A1;1) . it returns 43113

Is there any formula to calculate date?

I have an logic for grouping

=IF(A2<(A2+WEEKDAY(A2;1)) ;Return the number of the first week;Nested IF)

Target : there are 5 groups

  • june 1-7
  • june 8-14
  • june 15-21
  • june 22-28
  • june 29-5

如果所需组之外没有日期,这是所有数据的正确嵌套 IF 公式。

=IF(AND(I7>=43252;I7<=43258);1;IF(AND(I7>=43259;I7<=43265);2;IF(AND(I7>=43266;I7<=43272);3;IF(AND(I7>=43273;I7<=43279);4;5))))

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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