刘奋 发表于 2021-12-17 11:55:00

[求助] 怎么把时间区间按月分开

大神求助怎么把时间区间按月分开

许甜 发表于 2021-12-27 18:26:58

这样吗?
D7=SUBSTITUTE(TEXT(DATE(2020,10+ROW(A1)-1,20),"e/mm/dd")&"-"&TEXT(DATE(2021,11+ROW(A1)-1,30),"e/mm/dd"),"/","."),下拉。

夜夜风雨 发表于 2022-1-2 08:04:35

说明规则,模拟结果! OK?

诗生 发表于 2022-1-19 21:53:27

感谢,我试一下

蓝蝶儿 发表于 2022-2-6 04:52:24

例如:2020.10.20-2021.11.30

受过的伤成为勋章 发表于 2022-2-17 02:00:48

例如:2020.10.20-2021.11.30 通过公式分成2020.10.20-2020.10.31 2020.11.1-2020.11.30

八遷先生 发表于 2022-2-25 03:36:48

C1:D1=ROUND(SUM((TEXT(TRIM(MID(SUBSTITUTE(SUBSTITUTE(C2,".","/"),"-",REPT(" ",99)),{1,99},99)),"YYY M")&"/12")*{-1,1})*12,)+1
C3:D17=IF(ROW(A1)>C$1,"",IF(ROW(A1)=1,LEFT(C$2,FIND("-",C$2)-1),TEXT(EOMONTH(SUBSTITUTE(LEFT(C$2,FIND("-",C$2)-1),".","/"),ROW(A1)-2)+1,"YYY.M.D"))&"-"&IF(ROW(A1)=C$1,MID(C$2,FIND("-",C$2)+1,19),TEXT(EOMONTH(SUBSTITUTE(LEFT(C$2,FIND("-",C$2)-1),".","/"),ROW(A1)-1),"YYY.M.D")))
页: [1]
查看完整版本: [求助] 怎么把时间区间按月分开