Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 23
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default 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
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
How to update data from multiple sheets to one specific sheets Khawajaanwar Excel Discussion (Misc queries) 4 January 15th 10 07:31 AM
Working with multiple sheets Nav Excel Discussion (Misc queries) 8 May 29th 08 05:37 PM
Working with multiple sheets in a workbook malcolm Excel Discussion (Misc queries) 1 November 10th 06 02:27 AM
Multiple Sheets (Need to create 500 individual sheets in one workbook, pulling DATA Amaxwell Excel Worksheet Functions 4 August 17th 06 06:23 AM
creating macro working across multiple sheets Nicole Seibert Excel Worksheet Functions 8 February 28th 06 05:53 PM


All times are GMT +1. The time now is 12:02 PM.

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"