![]() |
help needed sorry I hit enter on the last one
I have a spreadsheet or workbook ( which ever you prefer) that I use daily.
It is quite extensive and has manty cells and rows of cells that I enter data in. ther is 4 times that may cells that contain formulas. I fill this out each day for the week and then print and submit it. After I print it I have to go to each cell and /or row of cells and delete the data. My question is, is there a way to format a cell with a command to delete all data in unprotected cells? -- Thanks Bob |
help needed sorry I hit enter on the last one
You could use a macro to delete all data in unprotected cells...
Sub Clearem() Dim c As Range For Each c In ActiveSheet.UsedRange If c.Locked = False Then c.ClearContents End If Next End Sub Paste the code in a VBA module in your workbook. Run it from your worksheet by selecting Tools Macro Macros Clearem Run. 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 "Postal Bob" wrote: I have a spreadsheet or workbook ( which ever you prefer) that I use daily. It is quite extensive and has manty cells and rows of cells that I enter data in. ther is 4 times that may cells that contain formulas. I fill this out each day for the week and then print and submit it. After I print it I have to go to each cell and /or row of cells and delete the data. My question is, is there a way to format a cell with a command to delete all data in unprotected cells? -- Thanks Bob |
help needed sorry I hit enter on the last one
You could try F5SpecialConstants to select all but FormulasOK
EditClear Contents Note: you state workbook so you would have to do this for each worksheet in that workbook. Gord Dibben MS Excel MVP On Tue, 14 Oct 2008 12:29:00 -0700, Postal Bob wrote: I have a spreadsheet or workbook ( which ever you prefer) that I use daily. It is quite extensive and has manty cells and rows of cells that I enter data in. ther is 4 times that may cells that contain formulas. I fill this out each day for the week and then print and submit it. After I print it I have to go to each cell and /or row of cells and delete the data. My question is, is there a way to format a cell with a command to delete all data in unprotected cells? |
All times are GMT +1. The time now is 01:23 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com