SOLVED

Help Needed - How can you count number of days that falls on a specific month based on range of date

%3CLINGO-SUB%20id%3D%22lingo-sub-1391350%22%20slang%3D%22en-US%22%3EHelp%20Needed%20-%20How%20can%20you%20count%20number%20of%20days%20that%20falls%20on%20a%20specific%20month%20based%20on%20range%20of%20date%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1391350%22%20slang%3D%22en-US%22%3E%3CP%3EHello%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EGood%20day.%20I%20hope%20everyone%20is%20doing%20well%20during%20this%20time.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20need%20help%20if%20someone%20can%20show%20or%20suggest%20how%20I%20can%20count%20the%20number%20of%20days%20that%20falls%20on%20a%20specific%20month%20based%20on%20a%20range%20of%20dates%2C%20please%20see%20example%20table%20of%20the%20result%20that%20I%20am%20aiming%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22image.png%22%20style%3D%22width%3A%20999px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Fgxcuf89792.i.lithium.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F191933i657C3A6A30C10F7F%2Fimage-size%2Flarge%3Fv%3D1.0%26amp%3Bpx%3D999%22%20title%3D%22image.png%22%20alt%3D%22image.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3EBased%20on%20the%20table%20above%2C%20I%20need%20a%20formula%20or%20way%20how%20it%20will%20count%20the%20number%20of%20days%20that%20fall%20between%20January%202020%20-%20December%202020%20between%20the%20range%20stated%20in%20Column%20A%20(Start%20Date)%20and%20Column%20B%20(End%20Date).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%20attached%20the%20excel%20file%20I%20created%20hopefully%20someone%20can%20help%20me.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EThank%20you%20to%20all%20and%20apologies%20if%20ever%20I%20was%20not%20able%20to%20explain%20my%20issue%20clearly.%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3ECCC%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-1391350%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3CLINGO-LABEL%3EFormulas%20and%20Functions%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1391788%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20Needed%20-%20How%20can%20you%20count%20number%20of%20days%20that%20falls%20on%20a%20specific%20month%20based%20on%20range%20of%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1391788%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F420500%22%20target%3D%22_blank%22%3E%40ian_122282%3C%2FA%3E%26nbsp%3BPlayed%20around%20with%20your%20examples%20and%20came%20up%20with%20a%20perhaps%20not%20very%20elegant%2C%20but%20working%20solution.%20Note%2C%20I%20used%20a%20helper%20column%20D.%20It%20also%20allocates%20total%20duration%20to%20more%20than%20two%20months%2C%20if%20applicable.%20See%20attached.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-1391854%22%20slang%3D%22en-US%22%3ERe%3A%20Help%20Needed%20-%20How%20can%20you%20count%20number%20of%20days%20that%20falls%20on%20a%20specific%20month%20based%20on%20range%20of%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-1391854%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F403176%22%20target%3D%22_blank%22%3E%40Riny_van_Eekelen%3C%2FA%3E%26nbsp%3Bthanks%20for%20providing%20a%20working%20solution.%3CBR%20%2F%3EThis%20gives%20me%20now%20some%20idea%20of%20how%20this%20work%20and%20I'll%20try%20to%20make%20some%20improvements.%3C%2FP%3E%3C%2FLINGO-BODY%3E
Highlighted
Occasional Contributor

Hello,

 

Good day. I hope everyone is doing well during this time.

 

I need help if someone can show or suggest how I can count the number of days that falls on a specific month based on a range of dates, please see example table of the result that I am aiming;

 

image.png

Based on the table above, I need a formula or way how it will count the number of days that fall between January 2020 - December 2020 between the range stated in Column A (Start Date) and Column B (End Date).

 

I have attached the excel file I created hopefully someone can help me.

 

Thank you to all and apologies if ever I was not able to explain my issue clearly.

 

CCC

 

 

2 Replies
Highlighted
Solution

@ian_122282 Played around with your examples and came up with a perhaps not very elegant, but working solution. Note, I used a helper column D. It also allocates total duration to more than two months, if applicable. See attached.

Highlighted

@Riny_van_Eekelen thanks for providing a working solution.
This gives me now some idea of how this work and I'll try to make some improvements.