Start & End date of a month year

hsandeep

Well-known Member
Joined
Dec 6, 2008
Messages
1,226
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

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
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[TABLE="class: html-maker-worksheet"]
<thead>[TR]
[TH][/TH]
[TH]A[/TH]
[TH]B[/TH]
[TH]C[/TH]
[TH]D[/TH]
[TH]E[/TH]
[TH]F[/TH]
[TH]G[/TH]
[TH]H[/TH]
[TH]I[/TH]
[TH]J[/TH]
[/TR]
</thead><tbody>[TR]
[TH]1[/TH]
[TD]July[/TD]
[TD="align: right"]2013[/TD]
[TD="align: right"]Jul 01, 2013[/TD]
[TD="align: right"]Jul 31, 2013[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD="align: right"]End of Month[/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]2[/TH]
[TD]01July2013[/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
[TR]
[TH]3[/TH]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD]J[/TD]
[TD]u[/TD]
[TD]l[/TD]
[TD]y[/TD]
[TD="align: right"]2[/TD]
[TD="align: right"]0[/TD]
[TD="align: right"]1[/TD]
[TD="align: right"]3[/TD]
[/TR]
[TR]
[TH]4[/TH]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[TD][/TD]
[/TR]
</tbody>[/TABLE]
Excel 2003

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)

<tbody>
[TD="bgcolor: #FFFFFF"] Worksheet Formulas [TABLE="class: html-maker-worksheet"]
<thead>[TR]

</thead><tbody>
</tbody>
[/TD]
[/TR]
</tbody>[/TABLE]

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,223,228
Messages
6,170,874
Members
452,363
Latest member
merico17

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