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

STYLE
QTY
TGT
DAYS
START DATE
END DATE
JUL-19
AUG-19
SEP-19
CARGO
5210
500
11
5-Jul
18-Jul
12
CHINO
9650
700
14
19-Jul
5-Aug
11
4
BASIC
14570
600
25
6-Aug
4-Sep
23
3

<tbody>
</tbody>
 

Excel Facts

Enter current date or time
Ctrl+: enters current time. Ctrl+; enters current date. Use Ctrl+: Ctrl+; Enter for current date & time.
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,214,915
Messages
6,122,214
Members
449,074
Latest member
cancansova

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