Highlighted
bhagbom
Level I

Deleting Rows based on criteria from multiple columns

I have a table that is test data from multiple test subjects. Due to system issues, occasional rows are "bad", affecting all test subjects. The columns hold data for each test subject. I would like to delete these bad rows based on criteria from all columns. Criteria is that if every column has a value below x, that row is deleted. Seems that I need to use "For Each Row" in combination with If() and And() but scripting guide does not have any helpful examples using And(). Any tips?

I could do this manually except I have over a million rows.
3 REPLIES 3
Highlighted
pmroz
Super User

Re: Deleting Rows based on criteria from multiple columns

You need a small script like the following:

Highlighted
Jeff_Perkinson
Community Manager Community Manager

Re: Deleting Rows based on criteria from multiple columns

There are a couple of pretty efficient ways to do this interactively if you're not looking for a scripted solution.

Try the Select Where... option under the Rows:Row Selection menu. You can select rows based on multiple conditions, including greater than and less than comparisons.

The Data Filter also works well to select rows based on multiple conditions.

Once the rows are selected just delete them.

Jeff
-Jeff
Highlighted
bhagbom
Level I

Re: Deleting Rows based on criteria from multiple columns

Thanks for the help gentlemen, I found both methods to work and be very useful!
Article Labels

    There are no labels assigned to this post.