• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

combo box calendar.

Injinia

Member
Hi,


I would like to assistance in building up the following: I have a table with column "date" which I currently fill manually for the days of the month. Which means 31 empty cells.


I would like to have a combo box, with only months ie August 2012 - August 2014, such that when I pick the month, the corresponding dates are automatically filled in the empty cells which I am currently filling in manually. And they would be updated every month as I choose a different month in the combo box.


Thanks in advance


-injinia
 
Injinia,


According to me, this would be easier to achieve with few lines of VBA using calender control.


Since I am posting this from my office network I am unable to upload the workbook with solution.If you can share your e-mail ID with me, I can send you the completed workbook; else I will provide you the solution tomorrow morning.


Mine is: pharmacyjukaushik@yahoo.com


Kaushik
 
Injinia


The combo box will return the index value of the chosen item in the Combo Box

use that to retrieve the date value from the Combo Box source

Then just add 1 to each previous cell


If that doesn't make sense, check this out: https://www.dropbox.com/s/fufp1c4tyodq85r/Combo%20Box%20Date.xlsx
 
Hui,


This works exactly as I would like. However, in 30 day months, the last cell is th first day of the following month. It doesn't really bother me but I am wondering would it be possible to only have the exact number of days for every month.


kaushik03 thanks for your input as well.


-Injinia
 
Injinia


In A3 put:
Code:
=IF($A$2+ROWS($A$2:A2)>EOMONTH($A$2,0),"",$A$2+ROWS($A$2:A2))

Copy down
 
Back
Top