[求助] 怎么把时间区间按月分开
大神求助怎么把时间区间按月分开这样吗?
D7=SUBSTITUTE(TEXT(DATE(2020,10+ROW(A1)-1,20),"e/mm/dd")&"-"&TEXT(DATE(2021,11+ROW(A1)-1,30),"e/mm/dd"),"/","."),下拉。 说明规则,模拟结果! OK? 感谢,我试一下 例如:2020.10.20-2021.11.30 例如:2020.10.20-2021.11.30 通过公式分成2020.10.20-2020.10.31 2020.11.1-2020.11.30 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]