Pages

2021-12-16

〔EXCEL〕計算年資﹥幾年幾月幾日-DATEDIF--h019

   

【計算年資﹥幾年幾月幾日】



=IF(DATEDIF(到職日,IF(離職日="",TODAY(),離職日+1),"Y")=0,"",DATEDIF(到職日,IF(離職日="",TODAY(),離職日+1),"Y")&"年") & IF(DATEDIF(到職日,IF(離職日="",TODAY(),離職日+1),"YM")=0,"",DATEDIF(到職日,IF(離職日="",TODAY(),離職日+1),"YM")&"月")&IF(DATEDIF(到職日,IF(離職日="",TODAY(),離職日+1),"MD")=0,"",DATEDIF(到職日,IF(離職日="",TODAY(),離職日+1),"MD")&"日")



相關課程:


章老師的電腦小講堂 https://www.facebook.com/ScenicSchool/
※※ 本區做為經常使用之程式碼複製區,提問請至小講堂唷 ※※