Confusion with data validation (list)
If you just want to calculate the number of days in a month based on the year in cell C8 and the month in cell C6, I suggest you try this formula:
=DAY(EOMONTH(DATE(C4,C2,1),0))
Besides, if you want to select the corresponding data in the Data worksheet, I suggest you try this:
=COUNTIFS(Data!A5:A63,Test!C8,Data!C5:C63,Test!C6)
Data worksheet:
Update: Please check if the following is helpful to you.