Deleting with an IF Statement

G

garungaha1

Hello Everyone,

I am trying to write an IF statement that will delete certain rows i
they match the false criteria.

Ex.


IF cells A7:A12>=500, if true keep those rows, if false delete thos
rows.

I am looking to delete the entire row if the statement is false. Ca
someone please help?

Thanks
 
D

Don Guillett

How about data>filter>autofilter>custom>go from there. Record a macro if
desired.
 
T

tjtjjtjt

A formula can't do this. Formulas are passive--they display a result only. This is just an FYI post--Don gave the begin of a solution.

tj
 
G

garungaha1

I need the rows to be deleted, because I need to use a sum formula afte
that, so those values need to be gone. Is there another way to achiev
this
 
G

garungaha1

I need to delete all rows with zeros and negatives. Is there a function
that can perform this? I am trying to get something in a macro. Thanks
 
K

krazylain

the guys above put you on the right track.

You can record a macro doing something like this:

(1) Record Macro
(2) Autofilter - equal zeros OR equals negative number..or whatever
(3) use "select visible cells only" option then delete the unwante
rows.
(4) You can now edit your macro for future use if this process will b
repeated often
 
D

Don Guillett

In fact, after auto filter, you can use SUBTOTAL to total just the visible
rows.
 
Top