Date Input with a Calendar Dialog

newcoder

New Member
Joined
Jul 1, 2011
Messages
15
Is it possible to have a calendar pop up when a user enters a cell, then validate it is a certain day of the week... Or perhaps have a button next to the cell that would display a calendar popup allowing the user to select from the calendar, then have it pasted back to the cell? I have Excel 2007, but it still appears to be very involved to perform this 'simple' task.

Something like "Cycle Date:" "99/99/99" <command button>

Or if that is not possible, or is very involved, is there a way within the cell to validate the date entered is Tuesday?

This spreadsheet would be distributed to end users so if there is some type of add-in it would have to be automatically installed.

regards,
newcoder
 

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
It sounds like you want a certain cell on your worksheet to have a drop down list of Tuesday dates. You don't need VBA for this. To accomplish this, follow these steps and please read carefully.

Step 1
From your worksheet, right click the sheet tab and select Insert > Worksheet. Double-click the new worksheet's sheet tab and enter "Dates" (without the quotes). This means, now you have created a new sheet and you have named it "Dates".

Step 2
In cell A1 of your new Dates sheet, type in
7-5-2011 (without the quotes)
and press the Enter key.
This means, you just entered the date of July 5, 2011 into cell A1 of the Dates worksheet and now your active cell is A2.

Step 3
Take a close look immediately above cell A1, which has the "A" column header. Immediately above that is a small box that is called the name box. Right now, it will say A2 because that is your current active selected cell. Use your mouse to click in the name box. Type in "A53" (without the quotes), hold down the Shift key, and while the Shift key is held down, press the Enter key. That will select range A2:A53. Take your hands off the keyboard.

Step 4
Press the F2 key.

Step 5
Type in
=A1+7 (without the quotes), hold down the Ctrl key, and while the Ctrl key is held down, press the Enter Key. This will enter all the dates from July 12, 2011to July 3, 2012 in column A. Take your hands off the keyboard.

Step 6
From the worksheet menu, click Edit > GoTo > Special > Current Region > OK. This will select A1:A53.

Step 7
From the keyboard, press Ctrl+C.

Step 8
Right-click anywhere in A1:A53 and select Paste Special > Values > OK.
This will make all the formulas as constants.

Step 9
Press the Esc key to exit Copy mode.

Step 10
Range A1:A53 is still selected.
Click in the name box again and type in
"mydates" (without the quotes) and hit the Enter key.

Step 11
Optionally hide your Dates sheet from the Home tab in the ribbon.

Step 12
Go to your worksheet of interest and select the cell where you want this drop-down to appear with the Tuesday dates.

Step 13
Press Alt+D+L to call the Data Validation dialog box and go to the Settings tab (or from the ribbon, Data tab, Data Tools section and find Data Validation).
In the Allow field, click List.
In the Source field, type in "=mydates" (without the quotes).
Optional, you may enter text in the Input Message tab or Error Alert tab depending on what you want your users to respectively see when they select that cell or try to enter a value in that cell that is not among the listed dates.
Click OK to exit the Data Validation dialog.

Step 14
Your data validated cell is still selected and now shows a drop-down arrow.
From the worksheet menu, click on Format > Cells > Number.
In the Category pane, select the Date item and choose a date format that you want the drop-down items to look like, and click OK.

Step 15
Now your cell, when selected, has a drop-down arrow that when you click on it, will let you select the list of Tuesday dates for the next year, displayed in the format you chose in Step 14.
 
Upvote 0
You're welcome I'm sure, as I wonder if you are the same person who asked the question. Not that it matters, it's all good, but as Dorothy said to Toto after landing in Oz, "My, people come and go so quickly here!"
 
Upvote 0

Forum statistics

Threads
1,224,606
Messages
6,179,862
Members
452,948
Latest member
UsmanAli786

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