formule pour calculer un intervalle entre deux dates

chakibox81

New Member
Joined
Mar 13, 2022
Messages
1
Office Version
  1. 2007
Platform
  1. Windows
salut tout le monde
je cherche une formule pour calculer un intervalle entre deux dates pour avoir le nombre de jours exact de chaque trimestre
exemple
date début 05/01/2021
date fin 25/11/2021

pour avoir ce résultat par nombre de jours sur chaque trimestre
1TRIMESTRE 86 2TRIMESTRE 90 3TRIMESTRE 90 4TRIMESTRE 54


merci
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
En premier, faites-vous une table de référence avec les dates des trimestres et leurs nombres de jours (DAYS, ou JOURS).
Écrivez ensuite les dates de début et de fin.
Enfin, dans une nouvelle table, avec une séquence de fonctions IF (SI) et des tests logiques (les dates sont codées en chiffres qui peuvent se comparer), on détermine par trimestre le nombre de jours.

À noter que le résultat est un peu différent de vos chiffres. Vérifier l'inclusion ou l'exclusion des dates limites.

Book4.xlsx
ABCD
1TrimestreDébutFinJours
211/1/213/31/2189
324/1/216/30/2190
437/1/219/30/2191
5410/1/2112/31/2191
6
7Date de début1/5/21
8Date de fin11/25/21
9
10TrimestreDébutFinJours
11105/01/20213/31/2185
12201/04/20216/30/2190
13301/07/20219/30/2191
14401/10/202111/25/2155
Sheet1
Cell Formulas
RangeFormula
D2:D5,D11:D14D2=DAYS(C2,B2)
B11:B14B11=IF(B$7>B2,B$7,B2)
C11:C14C11=IF(B$8>C2,C2,B$8)
 
Upvote 0

Forum statistics

Threads
1,215,200
Messages
6,123,612
Members
449,109
Latest member
Sebas8956

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top