Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
One click date + predefined text input.
I would like to create a button on my toolbar that once clicked inputs the
current date and 2 words. Example: With a cell JUST selected (not in typing/edit mode) you click this button and it automaticlly enters typing/edit mode (f2) then goes to the next line (alt + enter) and inputs the current date =TODAY() with a space and 2 words "no change". All without clearing the current contents of the cell. There may be multiple lines of text already. Any help would be appreciated. This would shave coniderable time off my daily Excel usage. |
#2
Posted to microsoft.public.excel.misc
|
|||
|
|||
One click date + predefined text input.
Create a macro. Then add the macro to the toolbar of your choice.
-- John C "James.T" wrote: I would like to create a button on my toolbar that once clicked inputs the current date and 2 words. Example: With a cell JUST selected (not in typing/edit mode) you click this button and it automaticlly enters typing/edit mode (f2) then goes to the next line (alt + enter) and inputs the current date =TODAY() with a space and 2 words "no change". All without clearing the current contents of the cell. There may be multiple lines of text already. Any help would be appreciated. This would shave coniderable time off my daily Excel usage. |
#3
Posted to microsoft.public.excel.misc
|
|||
|
|||
One click date + predefined text input.
This macro does what you want for a single cell (the active cell):
Sub AddDateAndComment() ActiveCell.Value = ActiveCell.Value & vbLf & _ Format(Now(), "MM/DD/YY") & " no change" End Sub Here is a version that lets you select multiple cells. The current date & "no change" comment will be added to every cell in the selection: Sub AddDateAndComment() Dim Rng As Range For Each Rng In Selection Rng.Value = Rng.Value & vbLf & _ Format(Now(), "MM/DD/YY") & " no change" Next End Sub Excel's Help has instructions on how to add a custom button to a toolbar (or a button on a worksheet), and to attach it to a macro. If you are new to macros, this link to Jon Peltier's site may be helpful: http://peltiertech.com/WordPress/200...e-elses-macro/ Hope this helps, Hutch "James.T" wrote: I would like to create a button on my toolbar that once clicked inputs the current date and 2 words. Example: With a cell JUST selected (not in typing/edit mode) you click this button and it automaticlly enters typing/edit mode (f2) then goes to the next line (alt + enter) and inputs the current date =TODAY() with a space and 2 words "no change". All without clearing the current contents of the cell. There may be multiple lines of text already. Any help would be appreciated. This would shave coniderable time off my daily Excel usage. |
#4
Posted to microsoft.public.excel.misc
|
|||
|
|||
One click date + predefined text input.
Very helpful and worked just like I wanted. Thank you.
"Tom Hutchins" wrote: This macro does what you want for a single cell (the active cell): Sub AddDateAndComment() ActiveCell.Value = ActiveCell.Value & vbLf & _ Format(Now(), "MM/DD/YY") & " no change" End Sub Here is a version that lets you select multiple cells. The current date & "no change" comment will be added to every cell in the selection: Sub AddDateAndComment() Dim Rng As Range For Each Rng In Selection Rng.Value = Rng.Value & vbLf & _ Format(Now(), "MM/DD/YY") & " no change" Next End Sub Excel's Help has instructions on how to add a custom button to a toolbar (or a button on a worksheet), and to attach it to a macro. If you are new to macros, this link to Jon Peltier's site may be helpful: http://peltiertech.com/WordPress/200...e-elses-macro/ Hope this helps, Hutch "James.T" wrote: I would like to create a button on my toolbar that once clicked inputs the current date and 2 words. Example: With a cell JUST selected (not in typing/edit mode) you click this button and it automaticlly enters typing/edit mode (f2) then goes to the next line (alt + enter) and inputs the current date =TODAY() with a space and 2 words "no change". All without clearing the current contents of the cell. There may be multiple lines of text already. Any help would be appreciated. This would shave coniderable time off my daily Excel usage. |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Input Text Upon Click Of Cell | Excel Worksheet Functions | |||
Calling a Userform from a Predefined Variable | Excel Worksheet Functions | |||
Creating a new worksheet using predefined rows | Excel Worksheet Functions | |||
reight click a cell without exiting from input mode | Setting up and Configuration of Excel | |||
Click on cell-calendar drops down-click on date-date fills cell. . | Setting up and Configuration of Excel |