By using wcxd.booksticle.com you agree to our cookie policy, We and our partners operate globally and use cookies, for multiple purposes

60 Things That Excel Can Do



Feature 19 - Delete Rows on complex condition


Code to delete rows when
  • Column M not an 'A'
  • columns (N,O,P,Q,R,U) are 0 or blank

    VBA code
  • Verify that that sheet is the correct one by checking column headers
  • Ask user before continuing
  • find the last row of the sheet
  • For each row
    • Check if above condition
    • delete the row if true
  • Display how many rows deleted

  •    ←User Defined Functions | →Create a Questionnaire | Table of Contents | Send us your feedback | Random | © 2025 All Rights Reserved | Edit