How to delete these Certain Rows

alive15

New Member
Joined
Jul 13, 2016
Messages
36
Good morning,

I have a sheet in Excel 2010 with over 24000 rows. Each row has info on my part, whether it's "good" or "bad". I want to delete all rows that have "bad" in column C. What's the fastest way to accomplish this?

Thanks!
 

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Good morning,

I have a sheet in Excel 2010 with over 24000 rows. Each row has info on my part, whether it's "good" or "bad". I want to delete all rows that have "bad" in column C. What's the fastest way to accomplish this?

Thanks!

Do you just need to do this once? Or do you have to repeat it over and over?
 
Upvote 0
I sorted the column which divided between good and bad parts, then took all the rows at the bottom which were "bad parts" and deleted them pretty quickly.
 
Upvote 0
I sorted the column which divided between good and bad parts, then took all the rows at the bottom which were "bad parts" and deleted them pretty quickly.

That's what I was going to suggest if you didn't need to do it a lot.
 
Upvote 0
I also need the same thing like this.
My excel daily got almost 500k rows.
I want to delete row 12am (not include date) at column in certain column..

By doing manually ny sorting, filter. It take time..

I hope there macro to fasten my job.
Thanks in advance
 
Upvote 0
@alive15
This macro modified from Rick Rothsteins code will do it very quickly

Code:
Sub MM1()
  With Range("C1", Cells(Rows.Count, "C").End(xlUp))
    .Replace "bad", "#N/A", xlWhole, , False, , False, False
    Columns("C").SpecialCells(xlConstants, xlErrors).EntireRow.Delete
  End With
End Sub
 
Upvote 0

Forum statistics

Threads
1,216,893
Messages
6,133,321
Members
449,797
Latest member
kingcobra

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top