Formula to strip out rows from a sheet?

papillon

Board Regular
Joined
Oct 14, 2002
Messages
88
Hallo,
I have a spreadsheet with 43,558 rows in which column A contains either 1 or 0. I want to strip out the rows which contain a 1 in column A leaving the rows with 0 in A.
Is there a formula to do this please?
Many thanks in advance,
papi
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
I dont know a formula, but maybe some VBA can help

Code:
Sub a_test()
fr = Cells(Rows.Count, 1).End(xlUp).Row
For c = fr To 1 Step -1
 
        If Range("a" & c) = 1 Then Range("a" & c).EntireRow.Delete
Next c
End Sub
 
Upvote 0
Depends what you ultimately want when you say "strip out". If you use AutoFilter or Advanced Filter you can see the rows you want without actually deleting the unwanted rows.

Or you could use Autofilter to show the rows you don't want and then simply delete them
 
Upvote 0

Forum statistics

Threads
1,224,592
Messages
6,179,789
Members
452,942
Latest member
VijayNewtoExcel

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