![]() |
How do I enter dates with one keystroke
I am new to excel. This may be the stupidest question of all time, but I would like to know how to assign, program, or whatever you call it in excel a date to a key so that when I am in a cell and want to enter that date all I have to do is use one keystroke. For example, can I somehow assign a date like 07/26/08 to the F10 key so that every time I press F10 the date 07/26/08 is entered into the cell where the cursor is?
Thanks in advance for any help you can provide me. |
How do I enter dates with one keystroke
This may not be exactly what you're looking for, but to enter the current
date in a cell click Control + ;. If you're entering 7/26/08 in multiple cells you could copy (the text) and select the cells you want it in by holding Control and clicking on them, then paste. I hope that is somewhat helpful. Best wishes! "barefoot" wrote: I am new to excel. This may be the stupidest question of all time, but I would like to know how to assign, program, or whatever you call it in excel a date to a key so that when I am in a cell and want to enter that date all I have to do is use one keystroke. For example, can I somehow assign a date like 07/26/08 to the F10 key so that every time I press F10 the date 07/26/08 is entered into the cell where the cursor is? Thanks in advance for any help you can provide me. -- barefoot |
How do I enter dates with one keystroke
Select a blank cell anywhere on your worksheet.
Go to Tools - Macro - Record New Macro. Choose a character to enter into the box for a Shortcut Key. Click OK. Type the date you want to enter. Click the check mark next to the edit area at the top to complete your data entry. Click the stop button on the macro recorder toolbar that appeared when you started recording. Now check your code. Click Alt+F11 to open the code. Double-click the "Modules" folder. Double-click "Module1" to look at the code. You should see something like: Sub Macro1() ' ' Macro1 Macro ' Macro recorded 8/13/2008 by Trevor M. Sides ' ' Keyboard Shortcut: Ctrl+d ' ActiveCell.FormulaR1C1 = "7/26/2008" End Sub Remove any other code, especially things like: Range("D15").Select You can repeat this for as many shortcut dates as you want. You must record the macro for each one, though, copy/pasting that code and changing the Keyboard Shortcut line doesn't actually create the shortcut. |
All times are GMT +1. The time now is 11:18 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com