+ Reply to Thread
Results 1 to 2 of 2

Deleting rows in between a named range

  1. #1
    Registered User
    Join Date
    11-15-2013
    Location
    UK
    MS-Off Ver
    Excel 2002
    Posts
    3

    Question Deleting rows in between a named range

    Please can someone assist me in trying to delete two rows in between a named range (not including the named ranges)? I currently have:


    Sub ClearDMM()

    Rows(Range("DMMCI").Row + 1 & ":" & (Range("DMMCI2").Row - 1)).Delete
    End Sub


    The problem is if the macro / button is run twice then as you'll see above ("DMMCI2").Row + 1 is the row above ("DMMCI").Row - 1 and therefore gets deleted.

    Is there a better way to only delete rows in between a named range if the upper and lower row are not next to eachother? Or a totally different way?

    Many thanks for your help,
    Shane

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Deleting rows in between a named range

    Hi,

    Please take a moment to re-read the forum rules re cross-posting.

    http://www.mrexcel.com/forum/excel-q...med-range.html

    Regards
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

+ 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. Replies: 1
    Last Post: 11-28-2013, 05:38 AM
  2. Help with automating deleting blank rows in a named range
    By spanna2000 in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 12-20-2012, 01:57 PM
  3. 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
  4. Deleting all rows in Named Table
    By LampCommandr in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-26-2011, 03:46 PM
  5. 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

Tags for this Thread

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