I have a sheet that displays the days of the month in cells A5:A35 based on the month and year. The month is refrenced is cell A2, and the year in B2. These two cells have drop down lists with A2 displaying the months (1,2,3...11,12) and B2 displaying the years 2012-2020.
The formula I am using starting from A5 is =DATE($B$2,$A$2,1), A6 would use =DATE($B$2,$A$2,2), A35 would use =DATE($B$2,$A$2,31). With 31 being the maximum amount of days in a month, there are some months that have 30 and 28.
For these shorter months take June for example, B35 reads 7/31/12, the first day of July. Febuary would display the first 3 days of March. Is there a way to have values where the month does not match the month selected in A2 to come back as a blank, so that if I select June, it only shows me 30 days, but if I select Aug it will show 31 days.
Any help would be greatly appreciated.
The formula I am using starting from A5 is =DATE($B$2,$A$2,1), A6 would use =DATE($B$2,$A$2,2), A35 would use =DATE($B$2,$A$2,31). With 31 being the maximum amount of days in a month, there are some months that have 30 and 28.
For these shorter months take June for example, B35 reads 7/31/12, the first day of July. Febuary would display the first 3 days of March. Is there a way to have values where the month does not match the month selected in A2 to come back as a blank, so that if I select June, it only shows me 30 days, but if I select Aug it will show 31 days.
Any help would be greatly appreciated.