Delete Rows Based On Criteria Excel VBA Macro

preview_player
Показать описание

In this video we see how delete rows upon certain criteria in Excel with VBA macros. The macro loops through each row with content in the worksheet, and checks if certain criteria for one or more fields is met to delete the row. The criteria can be any value along with the relational operators of the If statement. For example, that could be when the value is below a certain price, or when the profit is above a certain margin. It can also check for specific text, a string of certain length, etc.

And yet, if you want more, you can find various Excel applications of different nature in the other blogs of the Excel Macro Mania saga:
Рекомендации по теме
Комментарии
Автор

This was of great help! thanks you for sharing!

fatymcgordis
Автор

This is great and thanks for sharing.
Well laid out and explained in a way that someone like myself who only has basic knowledge of VBA can begin to understand. I really appreciate.

Chef-
Автор

Huge time saving code
Just loved it❤

shawonshah
Автор

Thanks a lot for your efforts my friend. subscribed. greetings from İstanbul.👏🙏✌

terrykahn
Автор

this is so helpful!! how would I do this if I wanted to get rid of every row that doesn't have a defined list of values in the row (i.e. i only want to keep the rows where the numbers match my defined set of values)

KatiesBookNook
Автор

Thanks for the video. I'm new to VBA and this helped but this is giving me a mismatch error 13. Used the same code except I have 3 conditions: numSet (usually a one-digit number), numDone (usually a one-digit number), and numRemains(usually a one-digit number), where I said if numSet>0 AND numDone>0 AND numRemains = 0....The code does its job and deletes the rows I want deleted, but when it finishes I keep getting this mismatch error 13. I tried changing the variables to long but still the same error. Anyways, can you help?

MrDanSmith
Автор

Can excel macro filter data based on input count. For example out of a 1000 rows data i need only 20 rows for each name match. Whenever i input the count and name in different sheet it should give me data of those rows. Is that possible in excel

bablooabhay