Yuav ua li cas xam koj hnub nyoog nrog Excel's DATEDIF muaj nuj nqi

Cov txheej txheem:

Yuav ua li cas xam koj hnub nyoog nrog Excel's DATEDIF muaj nuj nqi
Yuav ua li cas xam koj hnub nyoog nrog Excel's DATEDIF muaj nuj nqi
Anonim

Yuav Paub

  • Nkag mus rau koj hnub yug hauv ib lub xov tooj ntawm Excel thiab DATEDIF cov mis rau hauv ib lub xov tooj sib txawv. Nias Enter kom pom koj lub hnub nyoog tam sim no.
  • Cov qauv DATEDIF muaj cov ntaub ntawv ntawm tes rau hnub yug thiab hnub tam sim no.
  • DATEDIF suav cov xyoo, hli, thiab hnub nyob nruab nrab ntawm ob hnub, muab koj lub hnub nyoog.

Kab lus no piav qhia yuav ua li cas xam koj lub hnub nyoog siv Excel's DATEDIF cov qauv. Cov lus qhia no siv rau Excel 2019, 2016, 2013, 2010; Excel rau Microsoft 365, Excel Online, Excel rau Mac, Excel rau iPad, Excel rau iPhone, thiab Excel rau Android.

Xau ib hnub nyoog Nrog DATEDIF muaj nuj nqi

Ib qho siv rau Excel's DATEDIF muaj nuj nqi yog xam tus neeg lub hnub nyoog tam sim no. Yog tias koj tsis xav tias zoo li rub tawm daim ntawv qhia hnub, daim ntawv qhia yooj yim tuaj yeem tuaj yeem cawm tau. Xwb, siv txoj haujlwm los suav qhov sib txawv ntawm ob hnub.

Hauv cov qauv hauv qab no, DATEDIF muaj nuj nqi txiav txim siab ib tus neeg lub hnub nyoog tam sim no hauv xyoo, hli thiab hnub.

=DATEDIF(E1, TODAY(), "Y")&" Xyoo, "&DATEDIF(E1, TODAY(), "YM")&" hli, "&DATEDIF(E1, TODAY), "MD")&"Hnub"

Txhawm rau ua kom cov qauv ua haujlwm yooj yim dua, tus neeg lub hnub yug tau nkag mus rau hauv cell E1 ntawm daim ntawv ua haujlwm (saib piv txwv hauv qab). Lub xovtooj siv rau qhov chaw no yog nkag mus rau hauv cov qauv. Yog tias hnub yug tau muab khaws cia rau hauv ib lub xov tooj sib txawv hauv daim ntawv ua haujlwm, peb lub xov tooj ntawm tes yuav tsum tau hloov pauv.

Image
Image

Tus qauv siv DATEDIF peb zaug los xam thawj tus naj npawb ntawm xyoo, tom qab ntawd tus lej ntawm lub hlis, thiab tom qab ntawd cov hnub ntawm ob hnub. Peb feem ntawm cov qauv yog:

Number of Years: DATEDIF(E1, TODAY(), "Y")&" Xyoo,"

Number of months: DATEDIF(E1, TODAY(), "YM")&" Hli,"

Number of Days: DATEDIF(E1, TODAY(), "MD")&"Hnub"

Image
Image

Txhob Cia Siab Rau Tus Qauv Ua Ke

Lub ampersand (&) yog ib lub cim concatenation hauv Excel. Ib qho kev siv rau concatenation yog koom nrog cov ntaub ntawv xov tooj thiab cov ntawv nyeem ua ke thaum siv hauv ib qho qauv. Piv txwv li, lub ampersand koom nrog DATEDIF muaj nuj nqi rau cov ntawv xyoo, hli, thiab hnub nyob rau hauv peb seem ntawm tus qauv.

Image
Image

Hnub no() Muaj nuj nqi

Cov qauv no kuj ua rau siv TODAY() ua haujlwm los nkag rau hnub tam sim no rau hauv DATEDIF cov qauv. Txij li Hnub Nyoog () muaj nuj nqi siv lub khoos phis tawj hnub tseem ceeb los nrhiav hnub tam sim no, txoj haujlwm txuas ntxiv hloov tshiab txhua zaus ib daim ntawv ua haujlwm rov suav dua.

Cov ntawv ua haujlwm rov suav dua txhua zaus lawv qhib. Tus neeg lub hnub nyoog tam sim no nce ntxiv thaum qhib daim ntawv ua haujlwm tshwj tsis yog kev rov suav rov qab tsis siv neeg.

Piv txwv: xam koj hnub nyoog tam sim no nrog DATEDIF

Qhov piv txwv ntawm DATEDIF muaj nuj nqi suav koj hnub nyoog tam sim no:

  1. Sau koj hnub yug rau hauv cell E1 ntawm daim ntawv ua haujlwm dawb.
  2. Tau cov mis rau hauv cell E3:

    =DATEDIF(E1, TODAY(), "Y")&" Xyoo, "&DATEDIF(E1, TODAY(), "YM")&" hli, "&DATEDIF(E1, TODAY(), "MD ")&"Hnub"

  3. nias ENTER.

    Image
    Image
  4. Koj lub hnub nyoog tam sim no tshwm hauv cell E3 ntawm daim ntawv ua haujlwm.

Pom zoo: