Calculation of days in each month..

Kamran01

Board Regular
Joined
Feb 10, 2017
Messages
86
Dear Experts,

I have a data of planning as mentioned below i want to calculate days of each month from start to end date.
Here is my planning chart module and need your assistance in this regard,

I have shown example of desire data in last three columns.

Best Regard,
Kamran Noor

[TABLE="class: grid, width: 500, align: left"]
<tbody>[TR]
[TD]STYLE
[/TD]
[TD]QTY
[/TD]
[TD]TGT
[/TD]
[TD]DAYS
[/TD]
[TD]START DATE
[/TD]
[TD]END DATE
[/TD]
[TD]JUL-19
[/TD]
[TD]AUG-19
[/TD]
[TD]SEP-19
[/TD]
[/TR]
[TR]
[TD]CARGO
[/TD]
[TD]5210
[/TD]
[TD]500
[/TD]
[TD]11
[/TD]
[TD]5-Jul
[/TD]
[TD]18-Jul
[/TD]
[TD]12
[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TD]CHINO
[/TD]
[TD]9650
[/TD]
[TD]700
[/TD]
[TD]14
[/TD]
[TD]19-Jul
[/TD]
[TD]5-Aug
[/TD]
[TD]11
[/TD]
[TD]4
[/TD]
[TD][/TD]
[/TR]
[TR]
[TD]BASIC
[/TD]
[TD]14570
[/TD]
[TD]600
[/TD]
[TD]25
[/TD]
[TD]6-Aug
[/TD]
[TD]4-Sep
[/TD]
[TD][/TD]
[TD]23
[/TD]
[TD]3
[/TD]
[/TR]
</tbody>[/TABLE]
 

Excel Facts

Format cells as currency
Select range and press Ctrl+Shift+4 to format cells as currency. (Shift 4 is the $ sign).
I can't agree some of your example calculations, but assuming that "STYLE" is in cell A1, put this in G2 and copy down and across:


=IF(OR($E2 > EOMONTH(G$1,0),$F2 - 1 < G$1),"",MIN($F2,EOMONTH(G$1,0)) - MAX($E2 + 1,G$1))


Minor adjustments might be needed depending on whether you are trying to include or exclude the start and end dates from the count.
 
Upvote 0

Forum statistics

Threads
1,224,818
Messages
6,181,151
Members
453,021
Latest member
Justyna P

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