Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Ducatisto
 
Posts: n/a
Default 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   Report Post  
Paul Sheppard
 
Posts: n/a
Default


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   Report Post  
Peter Rooney
 
Posts: n/a
Default

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   Report Post  
Ragdyer
 
Posts: n/a
Default

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   Report Post  
Ducatisto
 
Posts: n/a
Default


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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Illinois Personal Information Protection Act [email protected] Excel Worksheet Functions 0 August 16th 05 03:15 AM
Update a spreadsheet with new information. a6kim Excel Discussion (Misc queries) 1 May 2nd 05 11:56 AM
Clearing information in certain columns jolly_lolly Excel Discussion (Misc queries) 1 April 22nd 05 02:41 AM
How to keep linked cells blank until information is entered? HollyB Excel Worksheet Functions 1 April 1st 05 07:48 PM
Sharing information between Access and Excel C.M. Warden Excel Discussion (Misc queries) 1 March 16th 05 12:38 PM


All times are GMT +1. The time now is 12:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"