Home |
Search |
Today's Posts |
#1
|
|||
|
|||
Clearing entered information
Firstly hi all, I am a complete noob when it comes to excel and am just starting to enjoy the power it offers. I have created an excel file for work that needs daily information inputted to calculate manpower hours to complete the daily tasks and at the end of the day needs to be cleared of that particular days information and the next days inputted. The task itself is not too particularly time consuming but I would like to know if there is way that with the aid of a "button" it would clear all the relevant information instead of manually deleting it. Duca -- Ducatisto ------------------------------------------------------------------------ Ducatisto's Profile: http://www.excelforum.com/member.php...o&userid=26976 View this thread: http://www.excelforum.com/showthread...hreadid=401879 |
#2
|
|||
|
|||
Ducatisto Wrote: Firstly hi all, I am a complete noob when it comes to excel and am just starting to enjoy the power it offers. I have created an excel file for work that needs daily information inputted to calculate manpower hours to complete the daily tasks and at the end of the day needs to be cleared of that particular days information and the next days inputted. The task itself is not too particularly time consuming but I would like to know if there is way that with the aid of a "button" it would clear all the relevant information instead of manually deleting it. Duca Hi Duca You could record a macro, as follows: Tools Macro Record New Macro In Macro Name give it a name (no spaces eg ClearData) Click OK now every key stroke / mouse click you make will be recorded, so select the cells you want to clear data from right mouse click and click on clear contents Tools Macro Stop Recording -- Paul Sheppard ------------------------------------------------------------------------ Paul Sheppard's Profile: http://www.excelforum.com/member.php...o&userid=24783 View this thread: http://www.excelforum.com/showthread...hreadid=401879 |
#3
|
|||
|
|||
Hi, Duca,
Be careful when recording your keystrokes, as the recorder will record you clearing (for example) A1:D20 - say you inserted a new row between rows 2 and 3 - your overall data range would be A1:D21, but your macro would only clear down to row 20. A better way is to give a range name to the range of cells you want to work with, by highlighting the range and using Insert Name Define from the menu. If you then subsequently insert or delete rows or columns within your named range, the name will refer to the modified range. You can then use something like Sub ClearMyDataRange Range("MyDataRange").clearcontents end sub where MyDataRange is the name you gave to the range. To attach this to a button, add the "button" tool from the "Forms" category and use it to draw buttons in your worksheet. When you draw the button, you will be prompted to specify the macro you want the button to run. You can change the macro that is attached to a button by right clicking it, then clicking "Assign Macro" to choose the macro you want to attach. If you need any help in where to create your macro, please come back! Hope this helps Pete "Ducatisto" wrote: Firstly hi all, I am a complete noob when it comes to excel and am just starting to enjoy the power it offers. I have created an excel file for work that needs daily information inputted to calculate manpower hours to complete the daily tasks and at the end of the day needs to be cleared of that particular days information and the next days inputted. The task itself is not too particularly time consuming but I would like to know if there is way that with the aid of a "button" it would clear all the relevant information instead of manually deleting it. Duca -- Ducatisto ------------------------------------------------------------------------ Ducatisto's Profile: http://www.excelforum.com/member.php...o&userid=26976 View this thread: http://www.excelforum.com/showthread...hreadid=401879 |
#4
|
|||
|
|||
Why not do it the "simple" way, and create a template?
Just take your unused form and: <File <SaveAs, And expand the "Save As Type" box at the bottom, Click on "Template(*.xlt)", Make sure the filename is what you would want, Then <Save. You now have your new, empty form ready for use by simply clicking on, (Depending on version) <File <New <General tab, Or <File <New <GeneralTemplates <General tab, And clicking on the filename of your form. What opens is a *copy* of your form, with a "1" appended to the end of the filename. The original is "untouched", and still stored in the templates folder. You can now use the "copy" and save it, or throw it away. You can even open multiple "copies" at the same time, each with it's own individual ID number appended to the filename. When it comes time to revise or update the template, simply make your changes to one of the copies, and do *almost* what you did the first time: <File <SaveAs, And expand the "Save As Type" box at the bottom, Click on "Template(*.xlt)", *Remove* the appended ID number, leaving the original filename intact, Then <Save. Of course, you'll now be told that this file already exists, and be asked if you wish to overwrite it, to which you answer "yes". -- HTH, RD --------------------------------------------------------------------------- Please keep all correspondence within the NewsGroup, so all may benefit ! --------------------------------------------------------------------------- "Ducatisto" wrote in message ... Firstly hi all, I am a complete noob when it comes to excel and am just starting to enjoy the power it offers. I have created an excel file for work that needs daily information inputted to calculate manpower hours to complete the daily tasks and at the end of the day needs to be cleared of that particular days information and the next days inputted. The task itself is not too particularly time consuming but I would like to know if there is way that with the aid of a "button" it would clear all the relevant information instead of manually deleting it. Duca -- Ducatisto ------------------------------------------------------------------------ Ducatisto's Profile: http://www.excelforum.com/member.php...o&userid=26976 View this thread: http://www.excelforum.com/showthread...hreadid=401879 |
#5
|
|||
|
|||
Paul Sheppard Wrote: Hi Duca You could record a macro, as follows: Tools Macro Record New Macro In Macro Name give it a name (no spaces eg ClearData) Click OK now every key stroke / mouse click you make will be recorded, so select the cells you want to clear data from right mouse click and click on clear contents Tools Macro Stop Recording Many thanks for all of your help. From all of your answers I was able to fulfill what I wanted and now I have a button on my sheet that the users can use to delete all of the old information. I just love learning! Duca -- Ducatisto ------------------------------------------------------------------------ Ducatisto's Profile: http://www.excelforum.com/member.php...o&userid=26976 View this thread: http://www.excelforum.com/showthread...hreadid=401879 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Illinois Personal Information Protection Act | Excel Worksheet Functions | |||
Update a spreadsheet with new information. | Excel Discussion (Misc queries) | |||
Clearing information in certain columns | Excel Discussion (Misc queries) | |||
How to keep linked cells blank until information is entered? | Excel Worksheet Functions | |||
Sharing information between Access and Excel | Excel Discussion (Misc queries) |