Need help with Column/Row removal if 0 or blank

hank3rd

New Member
Joined
Apr 5, 2017
Messages
11
I need to delete row(s) if the row is 0 (blank). I see some code the looks up the whole sheet, but not what I need.

Here is part of the instructions that I need to make a macro.

[TABLE="width: 663"]
<colgroup><col width="45" style="width: 34pt;"><col width="117" style="width: 88pt;"><col width="501" style="width: 376pt;"></colgroup><tbody>[TR]
[TD="class: xl65, width: 45, align: center"]5[/TD]
[TD="class: xl65, width: 117, align: center"]RAW DATA[/TD]
[TD="width: 501"]triple-sort by the columns below, largest to smallest[/TD]
[/TR]
[TR]
[TD="class: xl65, align: center"][/TD]
[TD="class: xl65, align: center"][/TD]
[TD]…"Clicks" in Column G, "Opens" in Column E and "Unsubs" in Column I[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: #D9D9D9, align: center"]6[/TD]
[TD="class: xl67, bgcolor: #D9D9D9, align: center"]RAW DATA[/TD]
[TD="class: xl66, bgcolor: #D9D9D9"]delete the rows with 0 clicks AND 0 Opens[/TD]
[/TR]
[TR]
[TD="class: xl67, bgcolor: #D9D9D9, align: center"]7[/TD]
[TD="class: xl67, bgcolor: #D9D9D9, align: center"] [/TD]
[TD="class: xl66, bgcolor: #D9D9D9"]of the remaining rows, delete where Unsubs = 1[/TD]
[/TR]
</tbody>[/TABLE]

I have number 5 done, I need 6/7 done. The "clicks" are in column G, "Opens" column E, and "Unsubs" column I.

Here is what a portion of the report looks like. https://cl.ly/0t351D3c2g30
0t351D3c2g30


I hope someone can help.
 

Excel Facts

Round to nearest half hour?
Use =MROUND(A2,"0:30") to round to nearest half hour. Use =CEILING(A2,"0:30") to round to next half hour.
I got this figured out. I also needed to delete rows if the Column cell had a 1.

[FONT=&quot]Application.ScreenUpdating = False[/FONT]
[FONT=&quot]Columns("G:G").SpecialCells(xlCellTypeBlanks).EntireRow.Delete[/FONT]
[FONT=&quot]Application.ScreenUpdating = True[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]Application.ScreenUpdating = False[/FONT]
[FONT=&quot]Columns("E:E").SpecialCells(xlCellTypeBlanks).EntireRow.Delete[/FONT]
[FONT=&quot]Application.ScreenUpdating = True[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot]Dim c As Range[/FONT]
[FONT=&quot] Dim SrchRng[/FONT]
[FONT=&quot]
[/FONT]

[FONT=&quot] Set SrchRng = ActiveSheet.Range("I:I")[/FONT]
[FONT=&quot] Do[/FONT]
[FONT=&quot] Set c = SrchRng.Find("1", LookIn:=xlValues)[/FONT]
[FONT=&quot] If Not c Is Nothing Then c.EntireRow.Delete[/FONT]
[FONT=&quot] Loop While Not c Is Nothing[/FONT]
[FONT=&quot]End Sub[/FONT]
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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