Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
adw223
 
Posts: n/a
Default Delete row depending on criteria


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)),Sheet 1!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.


--
adw223
------------------------------------------------------------------------
adw223's Profile: http://www.excelforum.com/member.php...o&userid=24750
View this thread: http://www.excelforum.com/showthread...hreadid=383193

  #2   Report Post  
Dave Peterson
 
Posts: n/a
Default

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.

adw223 wrote:

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)),Sheet 1!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.

--
adw223
------------------------------------------------------------------------
adw223's Profile: http://www.excelforum.com/member.php...o&userid=24750
View this thread: http://www.excelforum.com/showthread...hreadid=383193


--

Dave Peterson
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Delete Rows based on criteria in excel Novaglory Excel Discussion (Misc queries) 5 July 10th 07 08:29 PM
sorting more than 3 keys Brooke Excel Discussion (Misc queries) 3 June 18th 05 04:52 AM
How do I delete a row from a spreadsheet if criteria is not met i. wonderboy55 Excel Worksheet Functions 1 April 26th 05 03:43 PM
SUMPRODUCT Formula to Count Row of data Below Matched Criteria Sam via OfficeKB.com Excel Worksheet Functions 8 February 3rd 05 01:37 AM
Adding sales depending on 2 Criteria Jamie Excel Worksheet Functions 2 December 8th 04 02:59 PM


All times are GMT +1. The time now is 04:30 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"