how to delete row with specific criteria?

ZionX

New Member
Joined
Mar 17, 2011
Messages
11
Good days everyone, can anyone help me on the row deletion when it meet the condition?
this is my code i had wrote:
Code:
Dim count04 As Integer
For count04 = 5 To IR01 + 1
If Cells(count04, 23).Text = "break" Then Cells(count04, 23).Value = ""

If IsEmpty(Cells(count04 - 4, 6)) Or Cells(count04 - 4, 6).Text = "Mfg Name" Then Cells(count04 - 4, 6).EntireRow.Delete

Next count04

when i use EntireRow.Hidden = True, it succesfully hide the rows according to the conditions, but the use .Delete, it just deleted some rows that met the condition instead of all of it. Thanks for concern and help.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,224,534
Messages
6,179,391
Members
452,909
Latest member
VickiS

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