+ Reply to Thread
Results 1 to 3 of 3

Deleting cells within a named range within a macro

Hybrid View

Mr_Natural Deleting cells within a named... 01-13-2017, 09:03 AM
davesexcel Re: Deleting cells within a... 01-13-2017, 09:20 AM
Mr_Natural Re: Deleting cells within a... 01-13-2017, 09:30 PM
  1. #1
    Registered User
    Join Date
    10-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Deleting cells within a named range within a macro

    Hi,

    Is there a simple statement I can include within a macro to delete all cells within a nominated range?

    For example, if "range1" includes all cells from A1:Z99, is there a statement I can use to delete all cells within 'range1' or do I have to specifically refer to the range of cells themselves, namely A1:Z99.

    Thanks in advance.

    Mr N

  2. #2
    Forum Moderator davesexcel's Avatar
    Join Date
    02-19-2006
    Location
    Regina
    MS-Off Ver
    MS 365
    Posts
    13,524

    Re: Deleting cells within a named range within a macro

    Use this
    Range("range1").ClearContents

  3. #3
    Registered User
    Join Date
    10-28-2013
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    22

    Re: Deleting cells within a named range within a macro

    I thought I had tried that string - obviously not. Thanks Dave!

+ 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. Deleting cells within a named range within a macro
    By Mr_Natural in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-13-2017, 09:21 AM
  2. [SOLVED] Compare cells to named range and create new sheets using related named range
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 12-10-2015, 03:35 PM
  3. Deleting value from 1st cell effects named range
    By tanvi_kalra in forum Excel General
    Replies: 2
    Last Post: 03-26-2014, 03:22 AM
  4. Deleting rows in between a named range
    By shanecb in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 12-06-2013, 12:15 PM
  5. [SOLVED] Macro to update cells based on a named range
    By bomex1018 in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-10-2012, 10:20 PM
  6. Adding rows to named range and deleting them
    By Djwill in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 08-15-2012, 02:56 PM
  7. how do i maintain named range addressing after deleting row?
    By erp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 11-30-2005, 09:55 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