+ Reply to Thread
Results 1 to 3 of 3

Delete rows

  1. #1
    Registered User
    Join Date
    03-10-2015
    Location
    London
    MS-Off Ver
    2010
    Posts
    18

    Delete rows

    I have an excel worksheet with two different tables. In the second table I want to delete some rows that are showing. If some rows in (range) A50:A150 is blank then all cells in P50:P150, with the same row, should be deleted.

    I tried this

    On Error Resume Next
    Range("A50" & lr).SpecialCells(xlCellTypeBlanks).EntireRow.Delete

    it removed everything above and under A50 that had empty rows.

  2. #2
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: Delete rows

    Maybe:

    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,591

    Re: Delete rows

    Think it should maybe be:

    Please Login or Register  to view this content.

    Regards, TMS



    Please note ...

    Your post does not comply with Rule 3 of our Forum RULES. Use code tags around code.

    Posting code between [CODE]Please [url=https://www.excelforum.com/login.php]Login or Register [/url] to view this content.[/CODE] tags makes your code much easier to read and copy for testing, it also maintains VBA formatting.

    Highlight your code and click the # icon at the top of your post window. More information about these and other tags can be found here
    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


+ 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] how to delete delete rows with criteria and keeping formula
    By Bremmah in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-18-2013, 07:09 AM
  2. [SOLVED] Delete blank rows between data rows, shift rows up, then repeat
    By excelactuary in forum Excel General
    Replies: 2
    Last Post: 03-11-2013, 11:53 AM
  3. Replies: 5
    Last Post: 11-12-2012, 08:38 PM
  4. Macro to delete certain columns and delete rows based on time in another column
    By beepbeep27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-12-2012, 11:47 AM
  5. delete duplicate rows, delete empty rows
    By loade in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 05-03-2012, 05:42 AM

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