Link to home
Start Free TrialLog in
Avatar of upobDaPlaya
upobDaPlaya

asked on

How do I delete rows in MS Excel VBA if a condition is met

I know how to delete a row in Excel with VBA, but where I am struggling is how to delete rows if a certain condition is met.  For example for any row where Column H (Status) is = to 'Closed' then I wish to delete these rows.  Suggestions ?
ASKER CERTIFIED SOLUTION
Avatar of Subodh Tiwari (Neeraj)
Subodh Tiwari (Neeraj)
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Apply a filter to the data and Column H filter so only "Closed" is visible.

Select the visible rows or even just one column of visible rows and delete. The rows hidden by the filter will be unaffected.

Thanks
Rob H
Avatar of upobDaPlaya
upobDaPlaya

ASKER

It works great.
Thanks for the assist it works great...
Thx for the assist
The chosen answer resolves the issue considering the original requirement was to delete the rows based on a condition through VBA not with manual steps.