+ Reply to Thread
Results 1 to 9 of 9

Select multiple named ranges then clear contents

  1. #1
    Forum Contributor
    Join Date
    02-10-2012
    Location
    Newcastle upon Tyne
    MS-Off Ver
    Excel 2021
    Posts
    114

    Select multiple named ranges then clear contents

    Morning,

    Is there an easier way to code this?

    Please Login or Register  to view this content.
    I basically have multiple named ranges that I want to clear the contents of, effectively starting a fresh... do I have to loop through every sheet and named range?

    Thanks

  2. #2
    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,430

    Re: Select multiple named ranges then clear contents

    You will have to loop, but you don't need to select anything.

    Are the Named Ranges all the same as the sheet names?
    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


  3. #3
    Forum Contributor
    Join Date
    02-10-2012
    Location
    Newcastle upon Tyne
    MS-Off Ver
    Excel 2021
    Posts
    114

    Re: Select multiple named ranges then clear contents

    Yes the sheet and named ranges are the same...

    What's the most efficient way to loop?

  4. #4
    Forum Contributor
    Join Date
    02-10-2012
    Location
    Newcastle upon Tyne
    MS-Off Ver
    Excel 2021
    Posts
    114

    Re: Select multiple named ranges then clear contents

    Please Login or Register  to view this content.
    I think this will do what I need...

  5. #5
    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,430

    Re: Select multiple named ranges then clear contents

    Untested, but something like:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-10-2012
    Location
    Newcastle upon Tyne
    MS-Off Ver
    Excel 2021
    Posts
    114

    Re: Select multiple named ranges then clear contents

    Thanks

    I'm getting a subscript out of range error?

  7. #7
    Forum Contributor
    Join Date
    02-10-2012
    Location
    Newcastle upon Tyne
    MS-Off Ver
    Excel 2021
    Posts
    114

    Re: Select multiple named ranges then clear contents

    Scrap that it was a sheet name error...

    So it runs but the contents aren't cleared?

  8. #8
    Forum Contributor
    Join Date
    02-10-2012
    Location
    Newcastle upon Tyne
    MS-Off Ver
    Excel 2021
    Posts
    114

    Re: Select multiple named ranges then clear contents

    Ignore me... it works perfect, thanks so much!

  9. #9
    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,430

    Re: Select multiple named ranges then clear contents

    You're welcome.

+ 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. [SOLVED] Clear Contents of Repeating Column Ranges Rev 5
    By Billy Spivy in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-09-2018, 05:21 PM
  2. [SOLVED] Clear Contents of Repeating Column Ranges
    By Billy Spivy in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 03-06-2018, 05:54 PM
  3. [SOLVED] Clear contents for a few non-adjacent ranges
    By billj in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-26-2016, 06:17 AM
  4. [SOLVED] Need to copy & clear row contents to another named sheet?
    By Gatewaya89 in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 06-14-2016, 10:21 AM
  5. [SOLVED] How to Deselect Multiple Ranges on Multiple Sheets After Select & Clear
    By catnam in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 12-20-2014, 02:12 PM
  6. Clear Contents of Named Range in Excel 2007
    By Warderbrad in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-05-2009, 03:06 AM
  7. [SOLVED] VBA Macro to Clear Named Cell Contents
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-03-2006, 04:50 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