+ Reply to Thread
Results 1 to 4 of 4

Delete a selected row or range of rows in an Excel Table

  1. #1
    Registered User
    Join Date
    06-04-2009
    Location
    Uganda
    MS-Off Ver
    Excel 2003
    Posts
    3

    Delete a selected row or range of rows in an Excel Table

    I have a workbook with different tables, and I would like to have a macro that deletes selected rows in that table. Any help s most welcome

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Delete a selected row or range of rows in an Excel Table

    The same code is needed regardless of whether the selected row is in a table or not.

    Please Login or Register  to view this content.
    However, if you have other data in the same row and do not want to delete the entire row, we need to do something a little different. In such a case I would want to see your file.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    06-04-2009
    Location
    Uganda
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Delete a selected row or range of rows in an Excel Table

    Thanks, but this deletes an entire worksheet row and affects data in adjacent tables as well as formulas that were refering to the deleted row. For example if I have a formula in A4 reading =A3+1, and I delete row 3, errors are returned in my table.

  4. #4
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: Delete a selected row or range of rows in an Excel Table

    If you have other data in the same row and do not want to delete the entire row, we need to do something a little different. In such a case I would want to see your file.

+ 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] Delete rows outside the selected range
    By Ucpaul in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 06-27-2013, 08:12 PM
  2. [SOLVED] Excel vba or macro to delete selected rows in a protected sheet
    By ROHAN999 in forum Excel Programming / VBA / Macros
    Replies: 23
    Last Post: 04-21-2013, 02:29 PM
  3. Replies: 2
    Last Post: 08-28-2011, 02:39 AM
  4. autofilter macro to delete rows. Range dependant of cell selected (not hardcoded)
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 04-25-2011, 07:35 PM
  5. VBA code to delete rows in a selected range.
    By LD2020 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-23-2009, 02:06 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