Clearing Contents in certain cells

markerd

New Member
Joined
Mar 8, 2004
Messages
3
Hi,
Is it possible to clear details from certain cells in a worksheet. I have set up a worksheet for children to fill in the missing answers in a number of random cells. If I want another child to use the worksheet I have to manually delete the previous answers before another child can have a go.
Can this be done?
Thanks
markerd
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
Create a macro of the actions and assign a toolbar button to clear it for you.

To create a macro...
Go to tools
Macro
Record New Macro
Give it a name
Now complete your actions (clearing contents of the specific cells)
Click Stop Recording when you are done

To assign macro to a toolbar...
Go to tools
Customize
Commands
Highlight Macros on the left
Drag Custom Button and drop it on a toolbar
Do not click Close yet
Right Click on the button
Choose Assign Macro
Highlight your macro and click ok
Now you can close the customize box

Now each time you want to clear the contents of those cells, you can just click your custom button.
 
Upvote 0
How do you know that a new child is using the worksheet? Are they entering their names somewhere? Or are you overseeing their usage and you will be the person doing the clearing each time? If the child is entering the name (typing or picking from a list) then you may indeed find that you prefer a macro-based solution.

If you are going to be there, then you might just want a quick way to do this manually? Personally, I would <ul>[*]Select (highlight) all of the cells you want to clear by holding down the Ctrl key and clicking on them (or hit Shift+F8 to go into "Add mode"). [*]Once you have all the cells selected, type in a new name in the Name Box that's found on the left end of the formula bar, giving it a name like DeleteRange[*]Then any time you want to clear the cells, just pick DeleteRange in the Name Box dropdown list and hit your Delete key[/list]Then if you later decide that you do want to automate this via a button or using some type of Event Handler, your macro would only consist of one line of code:
[DeleteRange].ClearContents

HTH
 
Upvote 0

Forum statistics

Threads
1,213,560
Messages
6,114,306
Members
448,564
Latest member
ED38

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