Lookup and Populate cell

monkeyharris

Active Member
Joined
Jan 20, 2008
Messages
358
Office Version
  1. 365
Platform
  1. Windows
Hi,
In cell A2 i want the user to enter the month "January", ebruary" etc. Once this has been donei want the cells from A3 downwards to automaticly show the days in that month.

Any help please.
 

Excel Facts

Did you know Excel offers Filter by Selection?
Add the AutoFilter icon to the Quick Access Toolbar. Select a cell containing Apple, click AutoFilter, and you will get all rows with Apple
Put this in A3 and copy down 31 cells. You may need to change the year if it happens you need a leap year February. Is that what you mean?

=IFERROR(DAY(ROWS($A$1:A1)&LEFT($A$2,3)&2019),"")

May need a little alteration depending on local date setting.
 
Last edited:
Upvote 0
I assume you want to use the current year for the number of days in Feb since there are sometimes leap years.


Book1
A
2February
31
42
53
64
75
86
97
108
119
1210
1311
1412
1513
1614
1715
1816
1917
2018
2119
2220
2321
2422
2523
2624
2725
2826
2927
3028
31
32
33
Sheet1
Cell Formulas
RangeFormula
A3=IF(ROWS(A$3:A3)<=DAY(EOMONTH(DATEVALUE($A$2&" "&YEAR(TODAY())),0)),ROWS(A$3:A3),"")
 
Upvote 0
Or if you want the actual dates for the month
=IFERROR(DATE(YEAR(TODAY()),MONTH($A$2&1),DAY(ROW($A1)&$A$2&YEAR(TODAY()))),"")
 
Upvote 0
Or if you want the actual dates for the month
=IFERROR(DATE(YEAR(TODAY()),MONTH($A$2&1),DAY(ROW($A1)&$A$2&YEAR(TODAY()))),"")

Can't thank you all enough. The formula which keeps the days consistent with the month is fantastic.
 
Upvote 0
Glad we could help & thanks for the feedback
 
Upvote 0

Forum statistics

Threads
1,214,384
Messages
6,119,201
Members
448,874
Latest member
Lancelots

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