date for current month

apgmin

Board Regular
Joined
Mar 1, 2010
Messages
100
Office Version
  1. 2013
Platform
  1. Windows
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?
 

Some videos you may like

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

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,714
Office Version
  1. 365
Platform
  1. Windows
Are the dates in B1:D1 always in the current year?
If not, how are we to determine which year to use?
 

Fluff

MrExcel MVP, Moderator
Joined
Jun 12, 2014
Messages
55,728
Office Version
  1. 365
Platform
  1. Windows
How about
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

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,714
Office Version
  1. 365
Platform
  1. Windows
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

MrExcel MVP, Junior Admin
Joined
Aug 1, 2002
Messages
56,714
Office Version
  1. 365
Platform
  1. Windows
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
 

Watch MrExcel Video

Forum statistics

Threads
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.
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
Top