Delete row depending on criteria

A

adw223

I have an Excel file with 2 worksheets where the data in the cells in
worksheet 2 is determined by the data in worksheet 1.

eg. =IF(AND(TRUE=Sheet1!C2,(MONTH(Sheet1!A2)=3)),Sheet1!A2,"DELETE")

This means that if the date in cell A2 in sheet 1 is in March and cell
C2 in sheet 1 is TRUE then the cell that this formula is applied to
will be the same date as in cell A2 sheet 1 otherwise the cell says
DELETE. So I end up with something like the following in sheet 2

A B C
1 03 March 2005
2 DELETE
3 DELETE
4 06 March 2005
5 DELETE

Now my question is how do I get rid of the rows with DELETE without
using a macro. The idea is that I enter all the information that I am
dealing with into sheet 1 and that the relevant info is automatically
placed in the format I want in sheet 2.
Of course I’m open to a better formula than the one I’ve used. Any help
appreciated.
 
D

Dave Peterson

Apply Data|Filter|Autofilter
Show just the Deletes and delete the visible rows.

====
Or sort your data by that column and delete the first delete through the last
delete.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Top