Vai al contenuto principale

Come calcolare la durata del servizio dalla data di assunzione in Excel?

Se disponi di una serie di dati inclusi i nomi dei dipendenti e la data di entrata a far parte della tua azienda in un foglio di lavoro, ora, potresti voler calcolare la loro anzianità di servizio, significa ottenere quanti anni e mesi un dipendente ha lavorato per la tua azienda. In questo articolo, parlerò del metodo rapido per risolvere questo lavoro per te.

Calcola la durata del servizio dalla data di assunzione con la funzione FRAZIONE ANNO

Calcola la durata del servizio dalla data di noleggio con la funzione DATEDIF

Calcola la durata del servizio dalla data di noleggio ad oggi con la funzione DATEDIF

Calcola la durata del servizio dalla data di assunzione con una funzionalità straordinaria


Calcola la durata del servizio dalla data di assunzione con la funzione FRAZIONE ANNO

Per calcolare la durata del servizio dalla data di assunzione e una data specifica, la funzione FRAZIONE ANNO può aiutarti.

Inserisci o copia la seguente formula in una cella vuota:

=INT(YEARFRAC(B2,C2))

Note:: Nella formula sopra, B2 è la cella della data di assunzione e C2 è la cella della data di fine.

Quindi trascina il quadratino di riempimento per copiare la fromula nelle altre celle di cui hai bisogno e otterrai la durata del servizio della persona in anni.


Calcola la durata del servizio dalla data di noleggio con la funzione DATEDIF

Se devi calcolare la durata del servizio in anni esatti, mesi e giorni, la funzione DATEDIF in Excel può farti un favore.

Calcola la durata del servizio in anni:

Inserisci o copia la seguente formula in una cella vuota:

=DATEDIF(B2, C2, "y")& " Years"


Calcola la durata del servizio in anni e mesi:

Si prega di applicare la seguente formula:

=DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months"


Calcola la durata del servizio in anni, mesi e giorni:

Applicare la seguente formula:

=DATEDIF(B2,C2,"y") & " Years, " & DATEDIF(B2,C2,"ym") & " Months, " & DATEDIF(B2,C2,"md") & " Days"

Note:: Nella formula sopra, B2 è la cella della data di assunzione e C2 è la cella della data di fine.


Calcola la durata del servizio dalla data di noleggio ad oggi con la funzione DATEDIF

In alcuni casi, potresti voler calcolare la durata del servizio dalla data di assunzione a oggi, quindi, ogni giorno che apri il foglio di lavoro la durata del servizio verrà aggiornata automaticamente. In questo caso, dovresti combinare la funzione TODAY all'interno della funzione DATEDIF.

Si prega di applicare una delle seguenti formule alle proprie esigenze:

=DATEDIF(B4, TODAY(), "y")& " Years"
= DATEDIF (B4, TODAY (), "y") & "Years", & DATEDIF (B4, TODAY (), "ym") e "Mesi"
= DATEDIF (B6, TODAY (), "y") & "Years" & DATEDIF (B4, TODAY (), "ym") & "Mesi", & DATEDIF (B4, TODAY (), "md") & "Days"


Calcola la durata del servizio dalla data di assunzione con una funzionalità straordinaria

È un po 'difficile per te ricordare così tante formule, ma, se lo hai Kutools for Excel, Con la sua Data e ora Helper funzione, puoi calcolare rapidamente la durata del servizio in anni, mesi, giorni, anni + mesi + giorni o altri formati di cui hai bisogno.

Nota:Per applicare questo Data e ora Helper, in primo luogo, dovresti scaricare il file Kutools for Excele quindi applica la funzione in modo rapido e semplice.

Dopo l'installazione Kutools for Excel, per favore fai come questo:

1. Fare clic su una cella in cui si desidera individuare il risultato, quindi fare clic su Kutoolsformula Helper > Data e ora helper, vedi screenshot:

2. Nel Data e ora Helper finestra di dialogo, eseguire le seguenti operazioni:

  • Vedi Synhydrid opzione dal Tipologia sezione;
  • Nel Input di argomenti caselle di testo, selezionare le celle che contengono separatamente la data di assunzione e la data di fine;
  • Quindi, scegli il tipo di risultato di output di cui hai bisogno. Ad esempio, è possibile ottenere la durata del servizio in anni, mesi, anni + mesi + giorni, anni + mesi e così via.

3. Dopo aver terminato le impostazioni, fare clic su OK pulsante, e otterrai il primo risultato calcolato, quindi, devi solo trascinare la maniglia di riempimento per riempire questa formula per testare le celle, e ora otterrai il seguente risultato di cui hai bisogno:

Fai clic per scaricare Kutools per Excel e prova gratuita ora!


Articoli più relativi:

  • Contare il numero di giorni / giorni lavorativi / fine settimana tra due date
  • Hai mai avuto bisogno di contare il numero di giorni tra due date in Excel? Può essere, a volte, vuoi solo calcolare i giorni lavorativi tra due date e, a volte, devi contare i giorni del fine settimana solo tra le due date. Come puoi contare il numero di giorni tra due date in una determinata condizione?
  • Calcola giorni, ore e minuti tra due date
  • Supponendo di avere due colonne di celle di data e ora e ora, si desidera calcolare la differenza in giorni, ore e minuti tra queste due celle di data e ora come mostrato nella seguente schermata. In questo articolo, parlerò di alcuni metodi per risolvere questo compito per te.

I migliori strumenti per la produttività in ufficio

🤖 Assistente AI di Kutools: Rivoluziona l'analisi dei dati basandosi su: Esecuzione intelligente   |  Genera codice  |  Crea formule personalizzate  |  Analizzare i dati e generare grafici  |  Richiama le funzioni di Kutools...
Funzioni popolari: Trova, evidenzia o identifica i duplicati   |  Elimina righe vuote   |  Combina colonne o celle senza perdere dati   |   Round senza formula ...
Super ricerca: VLookup a criteri multipli    VLookup a valori multipli  |   VLookup su più fogli   |   Ricerca fuzzy ....
Elenco a discesa avanzato: Crea rapidamente un elenco a discesa   |  Elenco a discesa dipendente   |  Elenco a discesa a selezione multipla ....
Gestore di colonna: Aggiungi un numero specifico di colonne  |  Sposta colonne  |  Attiva/disattiva lo stato di visibilità delle colonne nascoste  |  Confronta intervalli e colonne ...
Funzionalità in primo piano: Messa a fuoco della griglia   |  Vista di progettazione   |   Grande barra delle formule    Gestore di cartelle di lavoro e fogli   |  Resource Library (Testo automatico)   |  Date picker   |  Combina fogli di lavoro   |  Crittografa/decrittografa le celle    Invia e-mail per elenco   |  Super filtro   |   Filtro speciale (filtro grassetto/corsivo/barrato...) ...
I 15 migliori set di strumenti12 Testo Strumenti (aggiungi testo, Rimuovi personaggi, ...)   |   50+ Grafico Tipi (Diagramma di Gantt, ...)   |   40+ Pratico Formule (Calcola l'età in base al compleanno, ...)   |   19 Inserimento Strumenti (Inserisci il codice QR, Inserisci immagine dal percorso, ...)   |   12 Conversione Strumenti (Numeri in parole, Conversione di valuta, ...)   |   7 Unisci e dividi Strumenti (Combina righe avanzate, Celle divise, ...)   |   ... e altro ancora

Potenzia le tue competenze di Excel con Kutools per Excel e sperimenta l'efficienza come mai prima d'ora. Kutools per Excel offre oltre 300 funzionalità avanzate per aumentare la produttività e risparmiare tempo.  Fai clic qui per ottenere la funzionalità di cui hai più bisogno...

Descrizione


Office Tab porta l'interfaccia a schede in Office e semplifica notevolmente il tuo lavoro

  • Abilita la modifica e la lettura a schede in Word, Excel, PowerPoint, Publisher, Access, Visio e Project.
  • Apri e crea più documenti in nuove schede della stessa finestra, piuttosto che in nuove finestre.
  • Aumenta la produttività del 50% e riduce ogni giorno centinaia di clic del mouse!
Comments (20)
Rated 5 out of 5 · 1 ratings
This comment was minimized by the moderator on the site
First, thank you very much for helping us!

I am trying to use the formula for years and months of service (=DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months") which works great, but I would like to add that line and another line that just has numbers in it. Is that possible? For instance: The formula =DATEDIF(B2,C2,"y")&" Years, "&DATEDIF(B2,C2,"ym")&" Months" is located in D2 and I would like to add number of years and months of service from another agency in E2 with the total sum in F2.

All assistance is great appreciated.
Rated 5 out of 5
This comment was minimized by the moderator on the site
If I have a mixed list of employees still with the company (with start date only) and employees no longer with the company (with start and end date), is there a formula for calculating length of service using current date unless there is an end date, in which case the end date would be used in place of the current date to calculate total length of service from start to end?
This comment was minimized by the moderator on the site
what version of Excel can i get this? I am unable to get the function on Excel 2016
This comment was minimized by the moderator on the site
Hello,
The Excel version in the example is Excel 2010. The DATEDIF function is not available in Excel 2013 and later versions.
DATEDIF is not a standard function and hence not part of functions library and so no documentation. Microsoft doesn't promote to use this function as it gives incorrect results in few circumstances.

This function does not appear in the 'Insert Function' dialog box and is not recognised in the 'Function Arguments' dialog box.
The accuracy of this function was improved slightly in Excel 2010 but some of the bugs were never fixed.

Hope it helps. Have a nice day.
Sincerely,
Mandy
This comment was minimized by the moderator on the site
After the years of service has been determined. How do you calculate the persons service computation date (SCD). Is there a formula to subtract the years of service from the persons new appointment date to get their SCD leave date?
This comment was minimized by the moderator on the site
i m in problem; I am new joining to Govt. dept. as Junior Clerk in Accounts site: I want to calculate to make service end period, and after to add extra months years days in service period given by government relaxation period to complete service 9 to 10 years as (the total service is 8 year, 8 months, 18 days) but govt. give 10 months and 28 days to compile the service period for allowing the come in to as pensioner. Thanks to you for solve that problem.
This comment was minimized by the moderator on the site
Dear have a good health to you. I requesting for adjust more months days year in less service length 9 years to make complet 10 years. please tell about it.
This comment was minimized by the moderator on the site
How can I just highlight the cells if the yearly anniversary is within a week? For example They started on 01/10/2020 and I want the start date to be highlighted yellow if the date is 24/09 in each year and then turn red if the anniversary has passed, so turn red 7 days after the 1st?
This comment was minimized by the moderator on the site
Work Services Calculation 1 month different in formula
This comment was minimized by the moderator on the site
If service is 25 Year 07 Months 05 Days than i calculate no. of year and the result is 25, but need to calculate/consider full year if months is equal to 06 months or exceed. After calculation
This comment was minimized by the moderator on the site
For calculating the length of services in years, months and days with start date and end date, I noted that the result for James is 20 days. I would like to confirm if the end date means separation effective date (Day 1 after termination/separation) or last employment date.
Both start (hire date) and end date (last employment date "LED") should be inclusive in the calculation. It is expected to return 21 days but not 20 days as it counted no. of days from 12/11/2025 to 12/31/2025.
How to change the formula? Or should it be used termination effective date (LED + 1 day) as cell C2, instead of input "LED" as end date?
This comment was minimized by the moderator on the site
Florence, you are correct, and the tutorial above is simply wrong. When calculating years of service/length of service, the calculation must be inclusive of the last day worked. Using basic date subtraction formulas tell the *difference* between 2 dates (which will short the length of service by 1 day). For example, if someone stated the 1st, and ended the following day (2nd), taking the date difference would be 1 day (when they actually worked 2 days). Another example: If you use the method above for someone who started work on January 1st, and their last day was December 31st, it will not show that they've worked a complete year -- which is of course an error. The way to get the correct answer is to add +1 to the end date. So, everywhere you see C2 above should be C2+1. This is a significant problem where people everywhere are using this incorrect formula for calculating years of service. The formula is typically correct except the edge case of the last day of employment being the exact day before their start day. I'm in a dispute with my former employer over this very issue. Formulas like this should always be checked for edge cases like worked 1 day, 2 days, worked exactly 1 year, the anniversary date, day before/after, etc. When doing this, you will see all sorts of problems like the one you described.
This comment was minimized by the moderator on the site
Hi, Florence,If you want to include both the start date and end date when calculating, you just need add 1 after the days part as below formula:=DATEDIF(B2,C2,"y") & " Years, " & DATEDIF(B2,C2,"ym") & " Months, " & DATEDIF(B2,C2,"md")+1 & " Days"
Please try, hope it can help you!
There are no comments posted here yet
Load More
Please leave your comments in English
Posting as Guest
×
Rate this post:
0   Characters
Suggested Locations