Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Working with multiple sheets
Hi
I have a multiple sheet workbook that I want to delete the same cells in each sheet. How do I set up a macro for someone else to do that if they are constantly adding new duplicate sheets. I need a macro that will automatically select the 2nd thru the last sheet so that the same cells on all the those sheets can be deleted with one macro. Thanks! Jim |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Working with multiple sheets
Jim,
By delete, do you mean remove their values? Assuming so, Sub DeleteCells(Rng ) Dim i As Long For i = 2 To Worksheets.Count Worksheets(i).Range(Rng.Address).ClearContents'cha nge ClearContents to Clear to clear formats etc. as well Next i End Sub run it like so DeleteCells Range("A1:H100") -- HTH Bob Phillips ... looking out across Poole Harbour to the Purbecks (remove nothere from the email address if mailing direct) "Jim" wrote in message ... Hi I have a multiple sheet workbook that I want to delete the same cells in each sheet. How do I set up a macro for someone else to do that if they are constantly adding new duplicate sheets. I need a macro that will automatically select the 2nd thru the last sheet so that the same cells on all the those sheets can be deleted with one macro. Thanks! Jim |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How to update data from multiple sheets to one specific sheets | Excel Discussion (Misc queries) | |||
Working with multiple sheets | Excel Discussion (Misc queries) | |||
Working with multiple sheets in a workbook | Excel Discussion (Misc queries) | |||
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA | Excel Worksheet Functions | |||
creating macro working across multiple sheets | Excel Worksheet Functions |