+ Reply to Thread
Results 1 to 6 of 6

Delete the same ranges in mutiple sheets

  1. #1
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Delete the same ranges in mutiple sheets

    Hi

    I was wondering for future reference if it's possible to shorten down the following code, in a way, not to repeat it 14 times as there are 14 sheets, and the ranges are identical to each sheet? The amount of times, I do something, someone says...."you can do it this way"

    So wondering if there is a way to change what I have copied and pasted 14 times, but changed the sheet names?

    Please Login or Register  to view this content.
    Thanks

  2. #2
    Forum Expert
    Join Date
    07-31-2010
    Location
    California
    MS-Off Ver
    Excel 2007
    Posts
    4,070

    Re: Delete the same ranges in mutiple sheets

    Please Login or Register  to view this content.

  3. #3
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Delete the same ranges in mutiple sheets

    Please Login or Register  to view this content.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  4. #4
    Forum Expert Bob Phillips's Avatar
    Join Date
    09-03-2005
    Location
    Wessex
    MS-Off Ver
    Office 2003, 2010, 2013, 2016, 365
    Posts
    3,284

    Re: Delete the same ranges in mutiple sheets

    Please Login or Register  to view this content.

  5. #5
    Forum Contributor
    Join Date
    10-16-2009
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    257

    Re: Delete the same ranges in mutiple sheets

    Thanks. I'll use the ones where I still have to name each shert, as I have others that dont need deleting, and guessing if I use the one that says only "each ws" it'll do it to every sheet.

  6. #6
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,508

    Re: Delete the same ranges in mutiple sheets

    You can use, for example,

    Please Login or Register  to view this content.
    and list the sheet names in the array.

    Or, to make it more flexible, you could list the sheets on a Control/Configuration worksheet and then loop through the list.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Conditional formating, mutiple variables, mutiple sheets
    By Adam_D in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 09-11-2012, 06:47 AM
  2. Copy and paste/ delete ranges from mulitpuls sheets macro
    By girt0n in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-07-2012, 08:23 AM
  3. Copying Mutiple Ranges in Excel 2003
    By lt.hillview in forum Excel General
    Replies: 7
    Last Post: 07-20-2010, 01:59 PM
  4. Help please with sumif when mutiple ranges
    By Paul Marsh in forum Excel General
    Replies: 8
    Last Post: 09-01-2005, 10:12 PM
  5. SUMIF with Mutiple Ranges & Criteria
    By PokerZan in forum Excel General
    Replies: 5
    Last Post: 08-04-2005, 05:31 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1