date for current month

apgmin

Board Regular
in column A1 : through data validation, I have restricted user to select a month ( January, February . . . December )
in column B1 : I need the first date of the month selected in A1
in column C1 : I need the last date of the month selected in A1
in column D1 : I need the 10th date of the month selected in A1

Can please any one help me on how to do it?

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

Joe4

Are the dates in B1:D1 always in the current year?
If not, how are we to determine which year to use?

yes sir

Fluff

MrExcel MVP, Moderator
Excel Formula:
``=DATE(YEAR(TODAY()),MONTH(A1&1),1)``
Excel Formula:
``=DATE(YEAR(TODAY()),MONTH(A1&1),10)``
Excel Formula:
``=EOMONTH(DATE(YEAR(TODAY()),MONTH(A1&1),1),0)``

Joe4

OK. Put these formulas in the following cells:

B1:
Excel Formula:
``=DATEVALUE(\$A1&" 1, "&YEAR(TODAY()))``

C1:
Excel Formula:
``=EDATE(DATEVALUE(\$A1&" 1, "&YEAR(TODAY())),1)-1``

D1:
Excel Formula:
``=DATEVALUE(\$A1&" 10, "&YEAR(TODAY()))``

You can then format those cells to show the dates in any date format that you desire.

Joe4

Actually, we could simplify the formulas I posted for C1 and D1, by making use of what we did in B1 (not need to rebuild a date each time).

So we could use this for C1:
Excel Formula:
``=EDATE(B1,1)-1``

and this for D1:
Excel Formula:
``=B1+9``

Replies
8
Views
584
Replies
3
Views
60
Replies
6
Views
78
Replies
0
Views
102
Replies
2
Views
147

1,127,988
Messages
5,627,996
Members
416,286
Latest member
ko15

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.

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

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