+ Reply to Thread
Results 1 to 7 of 7

Would like to delete rows based on cell content

  1. #1
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Would like to delete rows based on cell content

    Good Morning All,

    The attached sample spreadsheet is divided into two sections. The top section is regular sales orders and the bottom section is non regular sales orders. I'm currently using the code below to delete rows based on color of column A. I would like to modify the current code to delete rows based on column A for regular sales orders only and to delete non regular sales orders based on SO status in column Q. Any non regular sales order with a SO status in column Q of A or S should be deleted with the macro. Any help is appreciated.

    Please Login or Register  to view this content.
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Would like to delete rows based on cell content

    Please Login or Register  to view this content.
    Surround your VBA code with CODE tags e.g.;
    [CODE]your VBA code here[/CODE]
    The # button in the forum editor will apply CODE tags around your selected text.

  3. #3
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Would like to delete rows based on cell content

    AlphaFrog,

    Thanks for the quick response. There is just one issue. I only want to delete rows in the bottom half of the sheet based on content in column Q. Your code deletes all rows based on column Q.

  4. #4
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Would like to delete rows based on cell content

    Quote Originally Posted by cindywylie View Post
    AlphaFrog,

    Thanks for the quick response. There is just one issue. I only want to delete rows in the bottom half of the sheet based on content in column Q. Your code deletes all rows based on column Q.
    This only deletes between the two "Non-Regular Sales Orders" headers in column A

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 02-27-2014 at 12:15 PM.

  5. #5
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Would like to delete rows based on cell content

    AlphaFrog,

    Perfect! Is there anyway to combine the macro for the top half and the macro you created. If I could have one macro for this sheet, that would be great. If thats too much I understand. Thanks for your time.

    Please Login or Register  to view this content.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,651

    Re: Would like to delete rows based on cell content

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    08-15-2012
    Location
    USA
    MS-Off Ver
    Office 365
    Posts
    73

    Re: Would like to delete rows based on cell content

    Works perfectly. Thanks so much for your help!

+ 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] Find rows to delete with a macro based on cell content
    By mkraffert in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-28-2013, 06:27 PM
  2. delete certain rows based on their partial cell content
    By WasWodge in forum Excel General
    Replies: 3
    Last Post: 01-30-2011, 02:37 PM
  3. Delete rows based on cell content
    By scaffdog845 in forum Excel Programming / VBA / Macros
    Replies: 17
    Last Post: 05-06-2010, 07:34 PM
  4. Need help to delete rows based on cell content
    By iturnrocks in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-17-2008, 12:10 PM
  5. Replies: 2
    Last Post: 10-03-2005, 10:05 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