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.

5RAW DATAtriple-sort by the columns below, largest to smallest
…"Clicks" in Column G, "Opens" in Column E and "Unsubs" in Column I
6RAW DATAdelete the rows with 0 clicks AND 0 Opens
7 of the remaining rows, delete where Unsubs = 1

<colgroup><col width="45" style="width: 34pt;"><col width="117" style="width: 88pt;"><col width="501" style="width: 376pt;"></colgroup><tbody>
</tbody>

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

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
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,215,877
Messages
6,127,500
Members
449,385
Latest member
KMGLarson

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