How to delete the content of all unlocked cells in a protected she

D

DrDisk7

I want to "zero" or "blank" all unlocked cells in a protected sheet or
workbook in Excel 2003 or later. I want to keep all locked cells untouched
and also keep the formatting and locked formulas as is for the whole sheet
(or workbook). In my view, this should be just a click on a button in Excel.
Please help! It would make life so much easier.
 
M

MartinW

Hi DrDisk,

You can do that by recording a macro.

With the sheet unprotected
Go to Tools>Macros>Record New Macro
Give the macro a name (say Clear1) and OK out

Then hold down the Ctrl button and select all
of the cells that you want to be cleared

Hit the delete button

Then click in the cell that you want to
be the active cell after the macro is run.

Then click on the stop button on the little
toolbar that appeared after you clicked OK above.

Now that you have recorded the macro
you can assign it to a button.

Go to View>Toolbars>Forms

On the forms toolbar select a button
Then click and drag a window where you want the button
A window should appear asking you to assign a macro to the button.
Select your macro and OK out.

You should be able to take it from there.
Note that you have an options menu by right clicking
on the button. You will get different options if you right click on the
button handles as opposed to right clicking on the button itself.

Once you are done you can protect the sheet again.

HTH
Martin
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top