Return dates from a list based on Month and Year cells

rhaas128

Board Regular
Joined
Jul 5, 2013
Messages
84
I have a workbook that has a defined list of months and years, along with a 2 different date columns that are not currently named. I need to be able to put a month/year on sheet1 from dropdown lists, and have the corresponding dates populate from those 2 different columns. Below is a sample idea of what I currently have:

Main table:

Month(Dropdown)Year(Dropdown)
Datecol1Datecol2

<tbody>
</tbody>

Date column table:

Datecol1Datecol2
07/20/201807/27/2018
08/03/201808/10/2018
08/17/2018

<tbody>
</tbody>


So if I choose 'August' and '2018' from the main table, it would return results like this:

August2018
08/03/201808/10/2018
08/17/2018

<tbody>
</tbody>


Can someone help me achieve this? Hopefully my goal makes sense. Thanks for all help in advance!
 

Excel Facts

Show numbers in thousands?
Use a custom number format of #,##0,K. Each comma after the final 0 will divide the displayed number by another thousand
Hi,

Take a look if this helps:


Book1
ABC
1Main table:
2
3Month(Dropdown)Year(Dropdown)
482018
5
6
7Date column table:
8Datecol1Datecol2
920-7-201827-7-2018
103-8-201810-8-2018
1117-8-2018
12
13Selector
14MonthYear
1582018
16Result
17Datecol1Datecol2
183-8-201810-8-2018
1917-8-2018
Sheet1
Cell Formulas
RangeFormula
A18{=IFERROR(INDEX($A$8:$A$11, MATCH(0, COUNTIF(A17:$A$17, $A$8:$A$11)+IF(MONTH($A$8:$A$11)<>$A$15, 1, 0)+IF(YEAR($A$8:$A$11)<>$B$15, 1, 0), 0),1), "")}
C18{=IFERROR(INDEX($C$8:$C$11, MATCH(0, COUNTIF(C17:$C$17, $C$8:$C$11)+IF(MONTH($C$8:$C$11)<>$A$15, 1, 0)+IF(YEAR($C$8:$C$11)<>$B$15, 1, 0), 0),1), "")}
Press CTRL+SHIFT+ENTER to enter array formulas.
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

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