troubleshooting Question

VBA to Delete the Filtered Rows in an Excel Table

Avatar of Jerry Paladino
Jerry PaladinoFlag for United States of America asked on
Microsoft OfficeMicrosoft ExcelVBA
3 Comments1 Solution358 ViewsLast Modified:
Requesting help with the VBA to delete the filtered rows from an Excel Table.   I do not want to delete the entire row but only the row in the table.   I understand the code below will delete the hidden table rows but it also deletes the entire row which I want to avoid.  Only the table row should be deleted.

    For Each rw In [Tbl_Mstr].Rows
        If rw.Rows.Hidden Then
           rw.Rows.Delete
        End If
    Next rw
Sample file with a filtered table is attached.  The Table name is "Tbl_Mstr".

Thank You - Jerry
Filtered-Table.xlsm
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 3 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 3 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros