Start date and End date in a calendar

elynoy

Board Regular
Joined
Oct 29, 2018
Messages
160
Office Version
  1. 365
  2. 2021
  3. 2016
Platform
  1. Windows
Hello, I use this formula
Code:
=DATA(M2;D2;1)

and this one too
Code:
=SE(H6<>"";SE(MÊS(H6)<>MÊS(H6+1);"";H6+1);"")

to retrieve the start date and the end date of the month.

How can i make it start on day 25 and go till day 26 of the next month since the formula hides the days if the months has one day less or more like february?

Best regards,
eLy
 
Last edited:
I tried
Rich (BB code):
"=SE(A2="26";=EOMONTH(DATE(A14,B14,1),-1)+26;EOMONTH(DATE(A14,B14,1),-1)+26)

but no matter what I change in the second part of the formula it wont work
 
Upvote 0

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
I figured it out. seems I cant use the "" in threre. anyway I got a working exemple for better understanding.

https://ufile.io/kwa01od7

if it put in cell B4, the day 26 it works. starts at 26 and finishes at 25 and the next month it repeats.

but if I start at day 25 for exemple, it repeats that day at the end and at the begining of the next month.

Not sure If I'm explainign myself good enought.

best regards,
eLy
 
Upvote 0
Sure ely,

Modified to refer to a cell for a start date. End date will be start date -1:


Book1
ABCDEFGHI
12Start Date26assuming end date =B12-1
13YearMonthDay 1Day 2Day 3Day 4Day 5Day 6Day 7
14201977/267/277/287/297/307/318/1
15201988/268/278/288/298/308/319/1
16201999/269/279/289/299/3010/110/2
1720191010/2610/2710/2810/2910/3010/3111/1
1820191111/2611/2711/2811/2911/3012/112/2
1920191212/2612/2712/2812/2912/3012/311/1
Sheet3
Cell Formulas
RangeFormula
C14=EOMONTH(DATE(A14,B14,1),-1)+$B$12
D14=IFERROR(IF(MONTH($C14)=MONTH(C14+1),C14+1,IF(DAY(C14+1)<=$B$12-1,C14+1,"")),"")
 
Upvote 0
Thank you! it's working like a charm now!

best regards,
eLY
 
Upvote 0

Forum statistics

Threads
1,224,937
Messages
6,181,865
Members
453,068
Latest member
DCD1872

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