Start & End date of a month year

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,215
Office Version
  1. 2010
Platform
  1. Windows
  2. Mobile
How to get 1st date & last date of a month based on month punched in a cell?
Ex:
A1=JULY, B1=2013
Answer: C1=01July2013, D1=31July2013
Also, required 01July2013 in separate 8 (or required no.) of cells.
Also, required 31July2013 in separate 8 (or required no.) of cells.
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
In C1 =DATE(B1,MONTH(DATEVALUE(A1& "1")),1)
In D1 =EOMONTH(C1,0)
 
Upvote 0
Have you factored in: February month ending with 29?
It WORKS.

Now, please SEPARATE 01July2013 in different cells as:
E1=0, F1=1, G1=J, H1=U, I1=L, J1=Y, K1=2, L1=0, M1=1, N1=3
 
Last edited:
Upvote 0
Excel Workbook
ABCDEFGHIJ
1July2013Jul 01, 2013Jul 31, 2013End of Month
201July2013
301July2013
4
3a
Excel 2003
Cell Formulas
RangeFormula
C1=(A1&B1)+0
D1=DATE(YEAR(C1),MONTH(C1)+1,0)
A2=TEXT(C1,"ddmmmmyyyy")
A3=MID($A$2,COLUMN(),1)
B3=MID($A$2,COLUMN(),1)
 
Upvote 0
3a
ABCDEFGHIJ
1July2013Jul 01, 2013Jul 31, 2013End of Month
201July2013
301July2013
4

<thead>
</thead><tbody>
</tbody>
Excel 2003

Worksheet Formulas
CellFormula
C1=(A1&B1)+0
D1=DATE(YEAR(C1),MONTH(C1)+1,0)
A2=TEXT(C1,"ddmmmmyyyy")
A3=MID($A$2,COLUMN(),1)
B3=MID($A$2,COLUMN(),1)

<thead>
</thead><tbody>
</tbody>

<tbody>
</tbody>

Formula in A3 & B3 is not giving desired results. Please re-check.
 
Upvote 0
Since no. of characters in months 'varies'. so output 01072013 is required instead of 01July2013. How to get 01072013 in above case?
 
Upvote 0
Also, for A1=July & B1=2013
Answer K1=31 (last date) or
A1=September & B1=2013
Answer K1=30 (last date).
How to achieve?
 
Upvote 0
Excel Workbook
ABCDEFGHIJK
1September2013Sep 01, 2013Sep 30, 2013End of MonthDays30
20109201330092013
301092013
430092013
3a
Excel 2003
Cell Formulas
RangeFormula
C1=(A1&B1)+0
D1=DATE(YEAR(C1),MONTH(C1)+1,0)
K1=DAY(D1)
A2=TEXT(C1,"ddmmyyyy")
A3=MID($A$2,COLUMN(),1)
A4=MID($B$2,COLUMN(),1)
B2=TEXT(D1,"ddmmyyyy")


Since no. of characters in months 'varies'. so output 01072013 is required instead of 01July2013. How to get 01072013 in above case?
Did you try editing the formula in A2?

Dave
 
Upvote 0
No. Since, I don't know what to edit in the formula of A2 to get 01072013 instead of 01July2013.
 
Upvote 0
"edit in the formula of A2 to get 01072013 " see message #8 above.

If you do not want to put the text in cell A2, try the following and copy it across.

=MID(TEXT($D$1,"ddmmyyyy"),COLUMN(),1)
 
Upvote 0

Forum statistics

Threads
1,216,106
Messages
6,128,863
Members
449,473
Latest member
soumyahalder4

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